Part Number Hot Search : 
38510 A5954 C2405A LCA0411 D1776 CF50603 11N60C 2SC3884
Product Description
Full Text Search
 

To Download TMP19A64C1DXBG Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 32bit TX System RISC TX19A Family TMP19A64C1DXBG
Rev1.1
2007.March.16
TMP19A64C1DXBG
Contents TMP19A64C1DXBG 1. Overview and Features 2. Pin Layout and Pin Functions 3. Processor Core 4. Memory Map 5. Clock/Standby Control 6. Interrupts 7. Input/Output Ports 8. External Bus Interface 9. Chip Selector and Wait Contoroller 10. DMA Controller (DMAC) 11. 16-bit Timer /Event COunters (TMRB) 12. 32-bit Timer (TMRC) 13. Serial Channel (SIO) 14. Serial Bus Interface (SBI) 15. Analog/Digital Converter 16. Watchdog Timer (Runaway Detection Timer) 17. Backup Module (Clock Timer ,Backup RAM) 18. Key-on Wakeup 19. ROM Correction Function 20. Security Function 21. Table of Special Function Registers 22. Electrical Characteristics 23. Notations, Precautions and Restrictions
TMP19A64(rev1.1)-1
TMP19A64C1D
32-bit RISC Microprocessor - TX19 Family
TMP19A64C1DXBG 1. Overview and Features
The TX19 family is a high-performance 32-bit RISC processor series that TOSHIBA originally developed by integrating the MIPS16TMASE (Application Specific Extension), which is an extended instruction set of high code efficiency. TMP19A64 is a 32-bit RISC microprocessor with a TX19A processor core and various peripheral functions integrated into one package. It can operate at low voltage with low power consumption. Features of TMP19A64 are as follows: (1) TX19A processor core 1) Improved code efficiency and operating performance have been realized through the use of two ISA (Instruction Set Architecture) modes - 16- and 32-bit ISA modes. * * 2) The 16-bit ISA mode instructions are compatible with the MIPS16e-TX instructions of superior code efficiency at the object level. The 32-bit ISA mode instructions are compatible with the TX39 instructions of superior operating performance at the object level.
Both high performance and low power consumption have been achieved.
RESTRICTIONS ON PRODUCT USE
* The information contained herein is subject to change without notice. 021023_D
070122EBP
* TOSHIBA is continually working to improve the quality and reliability of its products. Nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. It is the responsibility of the buyer, when utilizing TOSHIBA products, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failure of such TOSHIBA products could cause loss of human life, bodily injury or damage to property. In developing your designs, please ensure that TOSHIBA products are used within specified operating ranges as set forth in the most recent TOSHIBA products specifications. Also, please keep in mind the precautions and conditions set forth in the "Handling Guide for Semiconductor Devices," or "TOSHIBA Semiconductor Reliability Handbook" etc. 021023_A * The TOSHIBA products listed in this document are intended for usage in general electronics applications (computer, personal equipment, office equipment, measuring equipment, industrial robotics, domestic appliances, etc.). These TOSHIBA products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury ("Unintended Usage"). Unintended Usage include atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc. Unintended Usage of TOSHIBA products listed in this document shall be made at the customer's own risk. 021023_B * The products described in this document shall not be used or embedded to any downstream products of which manufacture, use and/or sale are prohibited under any applicable laws and regulations. 060106_Q * The information contained herein is presented only as a guide for the applications of our products. No responsibility is assumed by TOSHIBA for any infringements of patents or other rights of the third parties which may result from its use. No license is granted by implication or otherwise under any patents or other rights of TOSHIBA or the third parties. 070122_C * The products described in this document are subject to foreign exchange and foreign trade control laws. 060925_E * For a discussion of how the reliability of microcontrollers can be predicted, please refer to Section 1.3 of the chapter entitled Quality and Reliability Assurance/Handling Precautions. 030619_S
TMP19A64(rev1.1)1-1
TMP19A64C1D
High performance * * * * * * * 3) * * * Almost all instructions can be executed with one clock. High performance is possible via a three-operand operation instruction. 5-stage pipeline Built-in high-speed memory DSP function: A 32-bit multiplication and accumulation operation can be executed with one clock. Optimized design using a low power consumption library Standby function that stops the operation of the processor core Independency of the entry address Automatic generation of factor-specific vector addresses Automatic update of interrupt mask levels
Low power consumption
High-speed interrupt response suitable for real-time control
(2) On Chip program memory and data memory
Product name TMP19A64F20AXBG TMP19A64C1DXBG On chip ROM 2 Mbytes (Flash) 1.5 Mbytes On chip RAM 64 Kbytes 56 Kbytes
* * * * * * * * * * *
ROM correction function: 1 word x 8 blocks, 8 words x 4 blocks Backup RAM: 512 bytes 16-Mbyte off-chip address for code and date External data bus: Separate bus/multiplexed bus Chip select/wait controller : Dynamic bus sizing for 8- and 16-bit widths ports. : 6 channels : 8 channels : 11 channels
(3) External memory expansion
(4) DMA controller (5) 16-bit timer 16-bit interval timer mode 16-bit event counter mode 16-bit PPG output Event capture function
Data to be transferred to internal memory, internal I/O, external memory, and external I/O
2-phase pulse input counter function (1 channel assigned to perform this function): Multiplication-by-4 mode 32-bit input capture register 32-bit compare register 32-bit time base timer : 4 channels : 10 channels : 1 channel : 1 channel or synchronous mode can be selected.
(6) 32-bit timer * * *
(7) Clock timer (8) General-purpose serial interface: 7 channels * Either UART mode
TMP19A64(rev1.1)1-2
TMP19A64C1D
(9) Serial bus interface * * * * * * * (11) (12) * * *
2
: 1 channel : 24 channels
Either I C bus mode or clock synchronous mode can be selected Conversion speed: 54 clocks (7.85 s@54 MHz) Start by an internal timer trigger Fixed channel/scan mode Single/repeat mode High-priority conversion mode Timer monitor function Watchdog timer Interrupt source CPU: 2 factors ............. software interrupt instruction Internal: 50 factors....... The order of precedence can be set over 7 levels (except the watchdog timer interrupt). External: 20 factors...... The order of precedence can be set over 7 levels (except the NMI interrupt). Because 8 factors are associated with KWUP, the number of interrupt factors is one. : 1 channel
(10) 10-bit A/D converter with (S/H)
(13) 209 pins Input/output ports (14) Standby mode * * * * 4 standby modes (IDLE, SLEEP, STOP and BACKUP) On-chip PLL (multiplication by 4) Clock gear function: The high-speed clock can be divided into 8/8, 7/8, 6/8, 5/8, 4/8, 2/8 or 1/8. Sub-clock: SLOW, SLEEP and BACKUP modes (32.768 kHz) (15) Clock generator
(16) Endian: Bi-endian (big-endian/little-endian) (17) Maximum operating frequency * 54 MHz (PLL multiplication) Core: 1.35 V to 1.65 V I/O: 1.65 V to 3.3 V ADC: 2.7 V to 3.3 V Backup block : 2.3 V to 3.3 V (under normal operating conditions) : 1.8 V to 3.3 V (in BACKUP mode) (19) Package * P-FBGA281 (13 mm x 13 mm, 0.65 mm pitch) (18) Operating voltage range
TMP19A64(rev1.1)1-3
TMP19A64C1D
TX19 Processor Core
TX19A CPU MAC 1.5-Mbyte Flash
EJTAG
56-Kbyte RAM
ROM correction DMAC (8ch) INTC
Backup block
CG
EBIF
Clock timer (1ch) Backup RAM (512 bytes)
I/O bus I/F PORT0 to PORT6 (also function as external bus I/F) PORT7 to PORT9 (also function to receive ADC inputs) PORTA to PORTK, PORTO (also function as functional pins)
16-bit TMRB 0 to A (11ch) 32-bit TMRC TBT (1ch) 32-bit TMRC Input Capture 0 to 3 (4ch) 32-bit TMRC Compare 0 to 9 (10ch) 10-bit ADC (24ch) SIO/UART 0 to 6 (7ch) I2C/SIO (1ch)
PORTL to PORTN PORTP to PORTQ
(General-purpose ports)
KWUP 0 to 7 (8ch)
WDT
Fig. 1-1 TMP19A64C1DXBG Block Diagram
TMP19A64(rev1.1)1-4
TMP19A64C1D
2.
2.1
Pin Layout and Pin Functions
Pin Layout
Fig. 2.1.1 shows the pin layout of TMP19A64.
Fig. 2.1.1 Pin Layout Diagram (P-FBGA281)
A1 B1 C1 D1 E1 F1 G1 H1 J1 K1 L1 M1 N1 P1 R1 T1 U1 A2 B2 C2 D2 E2 F2 G2 H2 J2 K2 L2 M2 N2 P2 R2 T2 U2 V2 A3 B3 C3 D3 E3 F3 G3 H3 J3 K3 L3 M3 N3 P3 R3 T3 U3 V3 A4 B4 C4 D4 E4 F4 G4 H4 J4 K4 L4 M4 N4 P4 R4 T4 U4 V4 A5 B5 C5 D5 E5 F5 G5 H5 J5 K5 L5 M5 N5 P5 R5 T5 U5 V5 P6 R6 T6 U6 V6 G6 H6 J6 K6 L6 M6 N7 P7 R7 T7 U7 V7 N8 P8 R8 T8 U8 V8 N9 P9 R9 T9 U9 V9 N10 N11 N12 P10 P11 A6 B6 C6 D6 E6 A7 B7 C7 D7 E7 F7 A8 B8 C8 D8 E8 F8 A9 B9 C9 D9 E9 F9 A10 A11 B10 B11 A12 A13 A14 A15 A16 A17 B12 B13 B14 B15 B16 B17 B18
C10 C11 C12 C13 C14 C15 C16 C17 C18 D10 D11 D12 D13 D14 D15 D16 D17 D18 E10 E11 F10 F11 E12 E13 E14 E15 E16 E17 E18 F12 F14 F15 F16 F17 F18
G13 G14 G15 G16 G17 G18 H13 H14 H15 H16 H17 H18 J13 J14 J15 J16 J17 J18
K13 K14 K15 K16 K17 K18 L13 L14 L15 L16 L17 L18
M13 M14 M15 M16 M17 M18 N14 N15 N16 N17 N18
P12 P13 P14 P15 P16 P17 P18
R10 R11 R12 R13 R14 R15 R16 R17 R18 T10 T11 T12 T13 T14 T15 T16 T17 T18
U10 U11 U12 U13 U14 U15 U16 U17 U18 V10 V11 V12 V13 V14 V15 V16 V17
Table 2.1.2 shows the pin numbers and names of TMP19A64. Table 2.1.2 Pin Numbers and Names (1 of 2)
Pin No. A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 Pin name N.C. VREFL P90/AN16 P93/AN19 P80/AN8 P83/AN11 P70/AN0 P74/AN4 PO7/SCLK6/CTS6 PL2 PO6/RXD6 PO0/INT0 Pin No. A13 A14 A15 A16 A17 B1 B2 B3 B4 B5 B6 B7 Pin name PN2 PN0 PM5 PM1 X2 AVCC31 VREFH P91/AN17 P94/AN20 P81/AN9 P84/AN12 P71/AN1 Pin No. B8 B9 B10 B11 B12 B13 B14 B15 B16 B17 B18 C1 Pin name P75/AN5 PL0 PL3 PO5/TXD6 PO1/INT1 PN3 PN1 PM4 PM0 CVSS/BVSS X1 PCST0 (EJTAG) Pin No. C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 Pin name PCST3 (EJTAG) P92/AN18 P95/AN21 P82/AN10 P85/AN13 P72/AN2 AVSS PL1 PL4 PO4/INT4 PN6 PN4 Pin No. C14 C15 C16 C17 C18 D1 D2 D3 D4 D5 D6 D7 Pin name PM7 PM3 PK3/KEY3 CVCC15 XT2 TDO (EJTAG) PCST2 (EJTAG) DINT (EJTAG) DVCC15 P96/AN22 P86/AN14 P73/AN3
TMP19A64(rev1.1)2-1
TMP19A64C1D
Table 2.1.1 Pin Numbers and Names (2 of 2)
Pin No. D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 E17 E18 F1 F2 F3 F4 F5 F7 F8 F9 F10 F11 F12 F14 F15 F16 F17 BUPMD P42/CS2 P43/CS3 DVCC33 Pin name DVCC15 DVSS PL5 PO3/INT3 PN7 PN5 PM2 DVCC34 PK2/KEY2 PK4/KEY4 XT1 DCLK (EJTAG) PCST1 (EJTAG) TRST (EJTAG) PCST4 (EJTAG) ENDIAN P97/AN23 P87/AN15 P76/AN6 P77/AN7 PL6 PL7 PM6 PK6/KEY6 PK5/KEY5 BVCC PK1/KEY1 PK0/KEY0 DVCC15 DVSS TMS (EJTAG) EJE (EJTAG) BUSMD BOOT AVSS AVSS AVCC32 DVCC34 PO2/INT2 DVSS Pin No. F18 G1 G2 G3 G4 G5 G6 G13 G14 G15 G16 G17 G18 H1 H2 H3 H4 H5 H6 H13 H14 H15 H16 H17 H18 J1 J2 J3 J4 J5 J6 J13 J14 J15 J16 J17 J18 K1 K2 K3 K4 K5 K6 K13 Pin name P46/SCOUT RESET TDI (EJTAG) FVCC15 DVSS TOVR/TSTA (EJTAG) BW0 PK7/KEY7 BRESET P41/CS1 P37/ALE P35/BUSAK FVCC15 NMI DVCC31 PP7/TPD7 (EJTAG) BW1 PLLOFF TCK (EJTAG) TEST1 P31/WR P32/HWR P33/WAIT/RDY P30/RD P40/CS0 PP2/TPD2 (EJTAG) PP3/TPD3 (EJTAG) PP4/TPD4 (EJTAG) PP5/TPD5 (EJTAG) PP6/TPD6 (EJTAG) FVCC15 DVSS P47 N.C. P44/CS4 P36/ R/W P34/BUSRQ PP0/TPD0 (EJTAG) PP1/TPD1 (EJTAG) PQ5/TPD5/TPC5 (EJTAG) PQ6/TPD6/TPC6 (EJTAG) DVSS DVSS TEST2 Pin No. K14 K15 K16 K17 K18 L1 L2 L3 L4 L5 L6 L13 L14 L15 L16 L17 L18 M1 M2 M3 M4 M5 M6 M13 M14 M15 M16 M17 M18 N1 N2 N3 N4 N5 N7 N8 N9 N10 N11 N12 N14 N15 N16 N17 Pin name PI1/INT1 PI3/INT3 PI4/INT4 DVCC30 PI2/INT2 FVCC3 PQ1/TPD1/TPC1 (EJTAG) PQ2/TPD2/TPC2 (EJTAG) PQ3/TPD3/TPC3 (EJTAG) PE6/INTA PE7/INTB P13/D11/AD11/A11 P17/D15/AD15/A15 FVCC15 PI0/INT0 P45/CS5 PJ3/DACK3 PQ0/TPD0/TPC0 (EJTAG) PQ7/TPD7/TPC7 (EJTAG) PQ4/TPD4/TPC4 (EJTAG) PE3 PA7/TB3OUT DVCC32 P06/D6/AD6 P07/D7/AD7 DVSS PJ0/DREQ2 PJ2/DREQ3 PJ1/DACK2 PE5 PE0/TXD5 PE2/SCLK5/CTS5 PE1/RXD5 PA6/TB2OUT DVSS PD7/INT9 DVCC15 DVSS P56/A6 DVSS P27/A23/A7/A23 P15/D13/AD13/A13 TEST3 P16/D14/AD14/A14 Pin No. N18 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15 P16 P17 P18 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 T1 T2 T3 T4 T5 T6 T7 Pin name P14/D12/AD12/A12 PE4 PA2/TB0OUT PA3/TB1IN0/INT7 PA4/TB1IN1/INT8 PA5/TB1OUT PB6/TBAIN0 PG2/TC2IN PD6/SCLK4/CTS4 PC2/SCLK0/CTS0 PC5/SCLK1/CTS1 P52/A2 P62/A10 P65/A13 P26/A22/A6/A22 P02/D2/AD2 P10/D8/AD8/A8 P12/D10/AD10/A10 P11/D9/AD9/A9 PA0/TB0IN0/INT5 PA1/TB0IN1/INT6 PF3/DREQ2 PF4/DACK2 PF7/TBTIN PG7/TCOUT3 PG4/TCOUT0 PD5/RXD4 PC1/RXD0 PC4/RXD1 PH3/TCOUT7 P51/A1 P57/A7 P66/A14 P25/A21/A5/A21 P03/D3/AD3 P04/D4/AD4 P05/D5/AD5 PB0/TB4OUT PB1/TB5OUT PB2/TB6OUT PF2/SCK PF6/DACK3 PG5/TCOUT1 PD3/SCLK3/CTS3 Pin No. T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 U1 U2 U3 U4 U5 U6 U7 U8 U9 U10 U11 U12 U13 U14 U15 U16 U17 U18 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 Pin name PD4/TXD4 PC0/TXD0 PC3/TXD1 PH4/TCOUT8 PH6 P53/A3 P61/A9 P21/A17/A1/A17 P23/A19/A3/A19 P00/D0/AD0 P01/D1/AD1 PB4/TB8OUT PB3/TB7OUT PB7/TBAIN1 PF1/SI/SCL PF5/DREQ3 PG1/TC1IN PD2/RXD3 DVCC32 PC7/RXD2 PH1/TCOUT5 PH5/TCOUT9 P50/A0 P55/A5 DVCC33 P64/A12 P20/A16/A0/A16 P24/A20/A4/A20 FVCC3 PB5/TB9OUT PG0/TC0IN PF0/SO/SDA PG3/TC3IN PG6/TCOUT2 PD1/TXD3 PD0/SCLK2/CTS2 PC6/TXD2 PH2/TCOUT6 PH0/TCOUT4 PH7 P54/A4 P60/A8 P63/A11 P67/A15 P22/A18/A2/A18
TMP19A64(rev1.1)2-2
TMP19A64C1D
2.2
Pin Names and Functions
Table 2.2.1 shows the names and functions of input/output pins.
Table 2.2.1 Pin Names and Functions (1 of 6)
Pin name P00-P07 D0-D7 AD0-AD7 P10-P17 D8-D15 AD8-AD15 A8-A15 P20-P27 A16-A23 A0-A7 A16-A23 P30 RD P31 WR P32 HWR P33 WAIT RDY P34 BUSRQ P35 BUSAK P36 R/W P37 ALE P40 CS0 P41 CS1 P42 CS2 P43 CS3 P44 CS4 P45 CS5 P46 SCOUT P47 P50-P57 A0-A7 P60-P67 A8-A15 Number of pins 8 Input or output Input/output Input/output Input/output Input/output Input/output Input/output Output Input/output Output Output Output Output Output Output Output Input/output Output Input/output Input Input Input/output Input Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Input/output Output Input/output Output Function Port 0: Input/output port that allows input/output to be set in units of bits Data (lower): Data buses 0 to 7 (separate bus mode) Address data (lower): Address data buses 0 to 7 (multiplexed bus mode) Port 1: Input/output port that allows input/output to be set in units of bits Data (upper): Data buses 8 to 15 (separate bus mode) Address data (upper): Address data buses 8 to 15 (multiplexed bus mode) Address: Address buses 8 to 15 (multiplexed bus mode) Port 2: Input/output port that allows input/output to be set in units of bits Address: Address buses 16 to 23 (separate bus mode) Address: Address buses 0 to 7 (multiplexed bus mode) Address: Address buses 16 to 23 (multiplexed bus mode) Port 30: Port used exclusively for output Read: Strobe signal for reading external memory Port 31: Port used exclusively for output Write: Strobe signal for writing data of D0 to D7 pins Port 32: Input/output port (with pull-up) Write upper-pin data: Strobe signal for writing data of D8 to D15 pins Port 33: Input/output port (with pull-up) Wait: Pin for requesting CPU to put a bus in a wait state Ready: Pin for notifying CPU that a bus is ready Port 34: Input/output port (with pull-up) Bus request: Signal requesting CPU to allow an external master to take the bus control authority Port 35: Input/output port (with pull-up) Bus acknowledge: Signal notifying that CPU has released the bus control authority in response to BUSRQ Port 36: Input/output port (with pull-up) Read/write: "1" shows a read cycle or a dummy cycle. "0" shows a write cycle. Port 37: Input/output port Address latch enable (address latch is enabled only if access to external memory is taking place) Port 40: Input/output port (with pull-up) Chip select 0: "0" is output if the address is in a designated address area. Port 41: Input/output port (with pull-up) Chip select 1: "0" is output if the address is in a designated address area. Port 42: Input/output port (with pull-up) Chip select 2: "0" is output if the address is in a designated address area. Port 43: Input/output port (with pull-up) Chip select 3: "0" is output if the address is in a designated address area. Port 44: Input/output port (with pull-up) Chip select 4: "0" is output if the address is in a designated address area. Port 45: Input/output port (with pull-up) Chip select 5: "0" is output if the address is in a designated address area. Port 46: Input/output port System clock output: Selectable between high- and low-speed clock outputs, as in the case of CPU Port 47: Input/output port Port 5: Input/output port that allows input/output to be set in units of bits Address: Address buses 0 to 7 (separate bus mode) Port 6: Input/output port that allows input/output to be set in units of bits Address: Address buses 8 to 15 (separate bus mode)
8
8
1 1 1 1
1 1
1 1 1 1 1 1 1 1 1
1 8 8
TMP19A64(rev1.1)2-3
TMP19A64C1D
Table 2.2.1 Pin Names and Functions (2 of 6)
Pin name P70-P77 AN0-AN7 P80-P87 AN8-AN15 P90-P97 AN16-AN23 PA0 TB0IN0 INT5 PA1 TB0IN1 INT6 PA2 TB0OUT PA3 TB1IN0 INT7 PA4 TB1IN1 INT8 PA5 TB1OUT PA6 TB2OUT PA7 TB3OUT PB0 TB4OUT PB1 TB5OUT PB2 TB6OUT PB3 TB7OUT PB4 TB8OUT PB5 TB9OUT PB6 TBAIN0 PB7 TBAIN1 Number of pins 8 8 8 1 Input or output Input Input Input Input Input Input Input/output Input Input Input/output Input Input Input/output Output Input/output Input Input Input/output Input Input Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Output Input/output Input Input/output Input Port 7: Port used exclusively for input Analog input: Input from A/D converter Port 8: Port used exclusively for input Analog input: Input from A/D converter Port 9: Port used exclusively for input Analog input: Input from A/D converter Port A0: Input/output port 16-bit timer 0 input 0: For inputting the count/capture trigger of a 16-bit timer 0 Interrupt request pin 5: Selectable between "H" level, "L" level, rising edge, and falling edge Input pin with Schmitt trigger Port A1: Input/output port 16-bit timer 0 input 1: For inputting the count/capture trigger of a 16-bit timer 0 Interrupt request pin 6: Selectable "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port A2: Input/output port 16-bit timer 0 output: 16-bit timer 0 output pin Port A3: Input/output port 16-bit timer 1 input 0: For inputting the count/capture trigger of a 16-bit timer 1 Interrupt request pin 7: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port A4: Input/output port 16-bit timer 1 input 1: For inputting the count/capture trigger of a 16-bit timer 1 Interrupt request pin 8: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port A5: Input/output port 16-bit timer 1 output: 16-bit timer 1 output pin Port A6: Input/output port 16-bit timer 2 output: 16-bit timer 2 output pin Port A7: Input/output port 16-bit timer 3 output: 16-bit timer 3 output pin Port B0: Input/output port 16-bit timer 4 output: 16-bit timer 4 output pin Port B1: Input/output port 16-bit timer 5 output: 16-bit timer 5 output pin Port B2: Input/output port 16-bit timer 6 output: 16-bit timer 6 output pin Port B3: Input/output port 16-bit timer 7 output: 16-bit timer 7 output pin Port B4: Input/output port 16-bit timer 8 output: 16-bit timer 8 output pin Port B5: Input/output port 16-bit timer 9 output: 16-bit timer 9 output pin Port B6: Input/output port 16-bit timer A input 0: for inputting the count/capture trigger of a 16-bit timer A 2-phase pulse counter input 0 Port B7: Input/output port 16-bit timer A input 1: For inputting the count/capture trigger of a 16-bit timer A 2-phase pulse counter input 1 Function
1
1 1
1
1 1 1 1 1 1 1 1 1 1
1
TMP19A64(rev1.1)2-4
TMP19A64C1D
Table 2.2.1 Pin Names and Functions (3 of 6)
Pin name PC0 TXD0 PC1 RXD0 PC2 SCLK0 CTS0 PC3 TXD1 PC4 RXD1 PC5 SCLK1 CTS1 PC6 TXD2 PC7 RXD2 PD0 SCLK2 CTS2 PD1 TXD3 PD2 RXD3 PD3 SCLK3 CTS3 PD4 TXD4 PD5 RXD4 PD6 SCLK4 CTS4 PD7 INT9 Number of pins 1 1 1 Input or output Input/output Output Input/output Input Input/output Input/output Input Input/output Output Input/output Input Input/output Input/output Input Input/output Output Input/output Input Input/output Input/output Input Input/output Output Input/output Input Input/output Input/output Input Input/output Output Input/output Input Input/output Input/output Input Input/output Input Function Port C0: Input/output port Sending serial data 0: Open drain output pin depending on the program used Port C1: Input/output port Receiving serial data 0 Port C2: Input/output port Serial clock input/output 0 Ready to send serial data 0 (Clear To Send): Open drain output pin depending on the program used Port C3: Input/output port Sending serial data 1: Open drain output pin depending on the program used Port C4: Input/output port Receiving serial data 1 Port C5: Input/output port Serial clock input/output 1 Ready to send serial data 1 (Clear To Send): Open drain output pin depending on the program used Port C6: Input/output port Sending serial data 2: Open drain output pin depending on the program used Port C7: Input/output port Receiving serial data 2 Port D0: Input/output port Serial clock input/output 2 Ready to send serial data 2 (Clear To Send): Open drain output pin depending on the program used Port D1: Input/output port Sending serial data 3: Open drain output pin depending on the program used Port D2: Input/output port Receiving serial data 3 Port D3: Input/output port Serial clock input/output 3 Ready to send serial data 3 (Clear To Send): Open drain output pin depending on the program used Port D4: Input/output port Sending serial data 4: Open drain output pin depending on the program used Port D5: Input/output port Receiving serial data 4 Port D6: Input/output port Serial clock input/output 4 Ready to send serial data 4 (Clear To Send): Open drain output pin depending on the program used Port D7: Input/output port Interrupt request pin 9: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger
1 1 1
1 1 1
1 1 1
1 1 1
1
TMP19A64(rev1.1)2-5
TMP19A64C1D
Table 2.2.1 Pin Names and Functions (4 of 6)
Pin name PE0 TXD5 PE1 RXD5 PE2 SCLK5 CTS5 PE3-PE5 PE6 INTA PE7 INTB PF0 SO SDA Number of pins 1 1 1 Input or output Input/output Output Input/output Input Input/output Input/output Input Input/output Input/output Input Input/output Input Input/output Output Input/output Function Port E0: Input/output port Sending serial data 5: Open drain output pin depending on the program used Port E1: Input/output port Receiving serial data 5 Port E2: Input/output port Serial clock input/output 5 Ready to send serial data 5 (Clear To Send): Open drain output pin depending on the program used Ports E3 to E5: Input/output ports that allow input/output to be set in units of bits Port E6: Input/output port Interrupt request pin A: Selectable between "H" level, "L" level, rising edge, and falling edge Input pin with Schmitt trigger Port E7: Input/output port Interrupt request pin B: Selectable between "H" level, "L" level, rising edge, and falling edge Input pin with Schmitt trigger Port F0: Input/output port Pin for sending data if the serial bus interface operates in the SIO mode Pin for sending and receiving data if the serial bus interface operates in the I2C mode Open drain output pin depending on the program used. Input with Schmitt trigger Port F1: Input/output port Pin for receiving data if the serial bus interface operates in the SIO mode Pin for inputting and outputting a clock if the serial bus interface operates in the I2C mode Open drain output pin depending on the program used Input with Schmitt trigger Port F2: Input/output port Pin for inputting and outputting a clock if the serial bus interface operates in the SIO mode Port F3: Input/output port DMA request signal 2: For inputting the request to transfer data by DMA from an external I/O device to DMAC2 Port F4: Input/output port DMA acknowledge signal 2: Signal showing that DREQ2 has acknowledged a DMA transfer request Port F5: Input/output port DMA request signal 3: For inputting the request to transfer data by DMA from an external I/O device to DMAC3 Port F6: Input/output port DMA acknowledge signal 3: Signal showing that DREQ3 has acknowledged a DMA transfer request Port F7: Input/output port 32-bit time base timer input: For inputting the count for 32-bit time base timer Ports G0 to G3: Input/output ports that allow input/output to be set in units of bits For inputting the capture trigger for 32-bit timer Ports G4 to G7: Input/output ports that allow input/output to be set in units of bits Outputting 32-bit timer if the result of a comparison is a match Ports H0 to H5: Input/output ports that allow input/output to be set in units of bits Outputting 32-bit timber if the result of a comparison is a match Ports H6 to H7: Input/output ports that allow input/output to be set in units of bits Port I0: Input/output port Interrupt request pin 0: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port I1: Input/output port Interrupt request pin 1: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port I2: Input/output port Interrupt request pin 2: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger
3 1
1
1
PF1 SI SCL
1
Input/output Input Input/output
PF2 SCK PF3 DREQ2 PF4 DACK2 PF5 DREQ3 PF6 DACK3 PF7 TBTIN PG0-PG3 TC0IN-TC3IN PG4-PG7 TCOU0-TCOUT3 PH0-PH5 TCOU4-TCOUT9 PH6-PH7 PI0 INT0 PI1 INT1 PI2 INT2
1 1
Input/output Input/output Input/output Input Input/output Output Input/output Input Input/output Output Input/output Input Input/output Input Input/output Output Input/output Output Input/output Input/output Input Input/output Input Input/output Input
1
1
1
1 4 4 6 2 1
1
1
TMP19A64(rev1.1)2-6
TMP19A64C1D
Table 2.2.1 Pin Names and Functions (5 of 6)
Pin name PI3 INT3 PI4 INT4 PJ0 DREQ2 PJ1 DACK2 PJ2 DREQ3 PJ3 DACK3 PK0-PK7 KEY0-KEY7 PL0-PL7 PM0-PM7 PN0-PN7 PO0 INT0 PO1 INT1 PO2 INT2 PO3 INT3 PO4 INT4 PO5 TXD6 PO6 RXD6 PO7 SCLK6 CTS6 PP0-PP7 TPD0-TPD7 PQ0-PQ7 TPC0-TPC7 TPD0-TPD7 Number of pins 1 Input or output Input/output Input Input/output Input Input/output Input Input/output Output Input/output Input Input/output Output Input/output Input Input/output Input/output Input/output Input/output Input Input/output Input Input/output Input Input/output Input Input/output Input Input/output Output Input/output Input Input/output Input/output Input Input/output Output Input/output Output Output Function Port I3: Input/output port Interrupt request pin 3: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port I4: Input/output port Interrupt request pin 4: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port J0: Input/output port DMA request signal 2: For inputting the request to transfer data by DMA from an external I/O device to DMAC2 Port J1: Input/output port DMA acknowledge signal 2: Signal showing that DREQ2 has acknowledged a DMA transfer request Port J2: Input/output port DMA request signal 3: For inputting the request to transfer data by DMA from an external I/O device to DMAC3 Port J3: Input/output port DMA acknowledge signal 3: Signal showing that DREQ3 has acknowledged a DMA transfer request Port K: Input/output port that allows input/output to be set in units of bits KEY on wake up input 0 to 7 (with pull-up) With Schmitt trigger Port L: Input/output port that allows input/output to be set in units of bits Port M: Input/output port that allows input/output to be set in units of bits Port N: Input/output port that allows input/output to be set in units of bits Port O0: Input/output port Interrupt request pin 0: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port O1: Input/output port Interrupt request pin 1: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port O2: Input/output port Interrupt request pin 2: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port O3: Input/output port Interrupt request pin 3: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port O4: Input/output port Interrupt request pin 4: Selectable between "H" level, "L" level, rising edge and falling edge Input pin with Schmitt trigger Port O5: Input/output port Sending serial data 6: Open drain output pin depending on the program used Port O6: Input/output port Receiving serial data 6 Port O7: Input/output port Serial clock input/output 6 Ready to send serial data 6 (Clear To Send): Open drain output pin depending on the program used Port P: Input/output port that allows input/output to be set in units of bits Outputting trace data from the data access address: Signal for DSU-ICE Port P: Input/output port that allows input/output to be set in units of bits Outputting trace data from the program counter: Signal for DSU-ICE Outputting trace data from the data access address: Signal for DSU-ICE
1
1
1
1
1
8
8 8 8 1
1
1
1
1
1 1 1
8 8
TMP19A64(rev1.1)2-7
TMP19A64C1D
Table 2.2.1 Pin Names and Functions (6 of 6)
Pin name DCLK EJE PCST4-0 DINT TOVR/TSTA TCK TMS TDI TDO TRST NMI PLLOFF RESET X1/X2 XT1/XT2 BUPMD BRESET BUSMD Number of pins 1 1 5 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 Input or output Output Input Output Input Output Input Input Input Output Input Input Input Input Input/output Input/output Input Input Input Function Debug clock: Signal for DSU-ICE EJTAG enable: Signal for DSU-ICE (input with Schmitt trigger and built-in noise filter) PC trace status: Signal for DSU-ICE Debug interrupt: Signal for DSU-ICE (input with Schmitt trigger, pull-up and built-in noise filter) Outputting the status of PD data overflow status: Signal for DSU-ICE Test clock input: Signal for testing JTAG (input with Schmitt trigger and pull-up) Test mode select input: Signal for testing JTAG (input with Schmitt trigger and pull-up) Test data input: Signal for testing JTAG (input with Schmitt trigger and pull-up) Test data output: Signal for testing JTAG Test reset input: Signal for testing JTAG (input with Schmitt trigger and pull-down) Nonmaskable interrupt request pin: Pin for requesting an interrupt at the falling edge Input with Schmitt trigger and built-in noise filter Fix this pin to the "H (DVCC15) level."(Input with Schmitt trigger) Reset: Initializing LSI (with pull-up) Input with Schmitt trigger and built-in noise filter Pin for connecting to a high-speed oscillator Pin for connecting to a low-speed oscillator Backup mode trigger pin: This pin must be set to "L level" in backup mode. Backup module reset: Initializing the backup module (with pull-up) Input with Schmitt trigger Pin for setting an external bus mode: This pin functions as a multiplexed bus by sampling the "H (DVCC15) level" upon the rising of a reset signal. It also functions as a separate bus by sampling "L" upon the rising of a reset signal. When performing a reset operation, pull it up or down according to a bus mode to be used. Pin for setting endian: This pin is used to set a mode. It performs a big-endian operation by sampling the "H (DVCC15) level" upon the rising of a reset signal, and performs a littleendian operation by sampling "L" upon the rising of a reset signal. When performing a reset operation, pull it up or down according to the type of endian to be used. Pin for setting a single boot mode: This pin goes into single boot mode by sampling "L" upon the rising of a reset signal. It is used to overwrite internal flash memory. By sampling "H (DVCC15) level" upon the rising of a reset signal, it performs a normal operation. This pin should be pulled up under normal operating conditions. Pull it up when resetting. Fix these pins to BW0="H (DVCC15)" and BW1="H (DVCC15)," respectively. (Input with Schmitt trigger) Pin (H) for supplying the A/D converter with a reference power supply Connect this pin to AVCC31 if the A/D converter is not used. Pin (L) for supplying the A/D converter with a reference power supply Connect this pin to AVSS if the A/D converter is not used. Pin for supplying the A/D converter with a power supply. Connect it to a power supply even if the A/D converter is not used. A/D converter GND pin (0 V). Connect this pin to GND even if the A/D converter is not used. TEST pin: To be fixed to GND. Pin for supplying oscillators with power: 1.5 V power supply GND pin (0 V) for oscillators and backup modules Power supply pin: 1.5 V power supply Pin exclusively for supplying backup modules with power: 3 V power supply Power supply pin: 3 V power supply GND pin (0 V)
ENDIAN
1
Input
BOOT
1
Input
BW0-1 VREFH VREFL AVCC31-32 AVSS TEST1-3 CVCC15 CVSS/BVSS DVCC15 BVCC DVCC30-34 DVSS
2 1 1 2 3 3 1 1 4 1 8 11
Input Input Input - - Input - - - - - -
TMP19A64(rev1.1)2-8
TMP19A64C1D
Note 1: For BUSMD, ENDIAN and BOOT pins, the state designated for each pin ("H" or "L" level) must be maintained during one system clock before and after the rising of a reset signal. The reset pin must always be in a stable state at both "L" and "H" levels. Note 2: For DREQ2, DACK2, DREQ3 and DACK3, it is necessary to go to the port function register and to select one port from two groups of ports, PF3 to PF6 and PJ0 to PJ3. Two ports cannot be operated simultaneously to use the same function. Likewise, for pins INT0 through INT4, one port must be selected from ports PI0 to PI4 and ports PO0 to PO4. Table 2.2.2 shows the pin names and power supply pins. Table 2.2.2 Pin names and power supply pins Pin name P0 P1 P2 P3 P4 P5 P6 P7 P8 P9 PA PB PC PD PE PF PG PH PI PJ PK PL PM PN PO PP PQ Power supply pin DVCC33 DVCC33 DVCC33 DVCC33 DVCC33 DVCC33 DVCC33 AVCC32 AVCC32 AVCC31 DVCC32 DVCC32 DVCC32 DVCC32 DVCC32 DVCC32 DVCC32 DVCC32 DVCC30 DVCC33 DVCC34 DVCC34 DVCC34 DVCC34 DVCC34 DVCC31 DVCC31 Pin name PCST4 to 0 DCLK EJE TRST TDI TDO TMS TCK DINT TOV BUSMD BOOT ENDIAN NMI BRESET BUPMD X1, X2 XT1, XT2 BW0 and 1 PLLOFF RESET Power supply pin DVCC31 DVCC31 DVCC31 DVCC31 DVCC31 DVCC31 DVCC31 DVCC31 DVCC31 DVCC31 DVCC15 DVCC15 DVCC15 DVCC15 BVCC BVCC CVCC15 BVCC DVCC15 DVCC15 DVCC15
2.7 V AVCC32 AVCC31
TMP19A64(rev1.1)2-9
TMP19A64C1D
Table 2.2.3 shows the pin numbers and power supply pins. Table 2.2.3 Pin numbers and power supply pins Power supply pin DVCC15 CVCC15 DVCC30 DVCC31 DVCC32 DVCC33 DVCC34 AVCC31 AVCC32 BVCC Pin number D4, D8, E18, N9 C17 K17 H2 M6, U8 F17, U14 D15, F10 B1 F9 E15 Voltage range 1.35 V to 1.65 V 1.35 V to 1.65 V 1.65 V to 3.3 V 1.65 V to 3.3 V 1.65 V to 3.3 V 1.65 V to 3.3 V 1.65 V to 3.3 V 2.7 V to 3.3 V 2.7 V to 3.3 V 2.3 V to 3.3 V (under normal operating conditions) 1.8 V to 3.3 V (in BACKUP mode)
TMP19A64(rev1.1)2-10
TMP19A64C1D
3. Processor Core
The TMP19A64 has a high-performance 32-bit processor core (TX19A processor core). For information on the operations of this processor core, please refer to the "TX19A Family Architecture." This chapter describes the functions unique to the TMP19A64 that are not explained in that document.
3.1
Reset Operation
To reset the device, ensure that the power supply voltage is in the operating voltage range, the oscillation of the internal high-frequency oscillator has stabilized at the specified frequency and that the RESET input has been "0" for at least 12 system clocks (1.78 s during external 13.5 MHz operation). Note that the PLL multiplication clock is quadrupled and the clock gear is initialized to the 1/8 mode during the reset period. When the reset request is authorized, * * the system control coprocessor (CP0) register of the TX19A processor core is initialized. For further details, please refer to the chapter about architecture. After the reset exception handling is executed, the program branches off to the exception handler. The address to which the program branches off to (address where exception handling starts) is called an exception vector address. This exception vector address of a reset exception (for example, nonmaskable interrupt) is 0xBFC0_0000H (virtual address). The register of the internal I/O is initialized. The port pin (including the pin that can also be used by the internal I/O) is set to a general-purpose input or output port mode.
* *
(Note 1) Set the RESET pin to "0" before turning the power on. Perform the reset after the power supply voltage has stabilized sufficiently within the operating range. (Note 2) The reset operation can alter the internal RAM state, but does not alter data in the backup RAM. (Note 3) Make sure that the power supply voltage has stabilized, wait for 500 s or longer, and perform the reset. (Note 4) In the FLASH program, the reset period of 0.5 uS or longer is required independently of the system clock.
TMP19A64 (rev1.1) 3-1
TMP19A64C1D
4. Memory Map
Fig. 4.1 shows the memory map of the TMP19A64.
Virtual address 0xFFFF FFFF 0xFF00 0000 16 MB reserved Kseg2 (1 GB) Physical address 16 MB reserved Kseg2 (cash enabled) 16 MB reserved
Internal RAM (64 KB)
Internal I/O 0xFFFF E000 Internal RAM area 0xFFFF DFFF (56 KB) projection 0xFFFF 0000 (reserved) 0xFFFD FFFF 0xFFFD 0000 0xFF3F FFFF 0xFF20 0000
0XBFCF FFFF 0xBFC0 0000 0xA000 0000 0x8000 0000 Kseg1 (cash disabled) Kuseg (2 GB) 16 MB reserved
(reserved) Kseg0 (cash enabled)
Reserved for debugging (2 MB)
(reserved) Internal ROM area 0x401F FFFF projection 0x4000 0000 Inaccessible Internal ROM 0x1FDF FFFF 0x1FC0 0000 0xFF00 0000 0x1FDF FFFF
User program area
Kuseg (cash enabled)
0x000F FFFF 0x0000 0000
512 MB
Maskable interrupt area Exception vector area
0x1FC0 0400
0x1FC0 0000
Fig. 4.1 Memory Map
(Note 1) The internal ROM is physically present in 0x1FC0_0000-0x1FDF_FFFF (2 MB). The internal RAM is physically present in 0xFFFD_0000-0xFFFD_FFFF (64 KB). 0xFFFF_0000-0xFFFF_DFFF (56 KB) becomes the projection area. You can access the internal RAM by accessing this area. The internal backup RAM area becomes 0xFFFF_E800-0xFFFF_E9FF (512 B). (Note 2) For the TMP19A64, a physical space of only 16 MB is available as external address space to be accessed. It is possible to place this 16-MB physical address space in a chip select area of your choice inside the 3.5-GB physical address space of the CPU. Access to internal memory, internal I/O space and reserved areas is given priority over access to the external address space. Therefore, access to the external address space is denied if any of the internal memory, internal I/O space or reserved areas are being accessed. (Note 3) Do not place an instruction in the last four words of a physical area, specifically the last four words of an area where memory is mounted for external ROM extension (this varies depending on the system of the user). Internal ROM: 0x1FDF_FFF0-0x1FDF_FFFF
TMP19A64 (rev1.1) 4-1
TMP19A64C1D
5. Clock/Standby Control
5.1 System Operation Modes
The system operation modes contain the standby modes in which the processor core operations are stopped to reduce power consumption. Fig. 5.1.1 State Transition Diagram of Each Operation Mode is shown below.
Reset Reset has been performed IDLE mode (CPU stop) (I/O selective operation) Instruction Interrupt NORMAL mode (fc/gear value) Instruction Interrupt STOP mode (Entire circuit stop)
State Transition Diagram of Clock Mode When No Power is Supplied to the Backup Module
Reset Main power on Reset has been performed
IDLE mode (CPU stop) (I/O selective operation)
Instruction Interrupt
Interrupt
NORMAL mode (fc/gear value) Instruction
Instruction
Instruction SLEEP mode (fs only) Instruction
Interrupt Interrupt Instruction STOP mode (Note 1)
Interrupt External input & main power off (Note 2)
SLOW mode (fs)
BACKUP mode (fs only)
External input & main power off (Note 2)
State Transition Diagram of Clock Mode When Power is Supplied to the Backup Module
(Note 1) STOP mode: All the circuits except the backup module are brought to a stop. The backup module continues operation (fs continues oscillation). (Note 2) External input: It is necessary to activate the BUPMD pin during the RESET period. For details, see the chapter on Backup RAM. Fig. 5.1.1 State Transition Diagram of Each Operation Mode
TMP19A64 (rev1.1) 5-1
TMP19A64C1D
5.2
Default State of the System Clock
Reset Reset has been performed PLLOFF pin ("H") Use the PLL clock NORMAL mode fc = fpll = foscx4 fsys = fc/8 fsys = fosc/2 fperiph =fgear= fsys
Fig. 5.2.1 Initial State of the System Clock fosc: fpll: fc: fs: fgear: fsys: High-frequency clock frequency to be input via the X1 and X2 pins Clock frequency multiplied (quadrupled) by the PLL Clock frequency when the PLLOFF pin is in the "H" state Low-frequency clock frequency to be input via the XT1 and XT2 pins Clock frequency selected by the system control register SYSCR1 in the clock generator System clock frequency The CPU, ROM, RAM, DMAC and INTC all operate according to this clock. The internal peripheral I/O operates according to the fsys/2 clock.
fperiph: Clock frequency selected by SYSCR1 (Clock to be input to the peripheral I/O prescaler)
TMP19A64 (rev1.1) 5-2
TMP19A64C1D
5.3
Clock System Block Diagram
5.3.1 Main System Clock
* * * * Allows for oscillator connection or external clock input. Keep the PLLOFF pin (PLL (quadruple)) at the "H" level. Clock gear (8/8, 7/8, 6/8, 5/8, 4/8, 2/8, 1/8) (Default is 1/8.) Input frequency (high frequency)
Input frequency range PLL operation (for both oscillators and external input) 8-13.5 (MHz) Maximum operating frequency 54 MHz Lowest operating frequency 4 MHz *
* Clock gear 1/8 (default) is used when 8 MHz (MIN) is input.
*
Input frequency (low frequency)
Input frequency range 30 KHz to 34 KHz Maximum operating frequency 34 KHz Lowest operating frequency 30 KHz
(Note)
(precautions for switching the high-speed clock gear) Switching of clock gear is executed when a value is written to the SYSCR1 register. There are cases where switching does not occur immediately after the change in the register setting but the original clock gear is used for execution of instructions. If it is necessary to use the new clock for execution of the instructions following to the clock gear switching instruction, insert a dummy instruction (to execute a write cycle). To use the clock gear, ensure that you make the time setting such that Tn of the prescaler output from each block in the peripheral I/O is calibrated to Tn(Note)
TMP19A64 (rev1.1) 5-3
TMP19A64C1D
5.3.2
Clock Gear
* * The high-speed clock is divided into 8/8, 7/8, 6/8, 5/8, 4/8, 2/8 or 1/8. The internal I/O prescaler clock T0: fperiph/2, fperiph/4, fperiph/8 and fperiph/16
Fig. 5.3.1 shows the system clock transition diagram.
SYSCR0 SYSCR2 SYSCR1 ADC conversion clock fperiph (to peripheral I/O) fs
Warm-up timer fc (fs) /2
fgear
fsys SYSCR1 SYSCR0 X1 X2 PLL
1/2 1/4
1/8
SYSCR1
High-speed oscillator
fosc
fpll = fosc x 4
SYSCR1 Eight frequency divisions after the reset has been performed
fsys SYSCR0
CPU
ROM RAM
DMAC fperiph /2 /4 /8 /16 INTC ADC,TMRB/C, /2 XT1 XT2 (fs) Clock timer T0 Input to peripheral I/O prescaler TMRB/C, SIO, SBI, SIO, SBI, WDT, Port Peripheral I/O
Low-speed oscillator
fs
2-phase pulse input counter SYSCR3
SCOUT T0
Fig. 5.3.1 System Clock Transition Diagram
TMP19A64 (rev1.1) 5-4
TMP19A64C1D
5.4
CG Registers
5.4.1 System Control Registers
7 XEN R/W 1 High-speed oscillator 0: Stop
1: Oscillation
6 R/W 1 Write "1."
SYSCR0 (0xFFFF_EE00)
bit Symbol Read/Write After reset Function
5 RXEN R/W 1 High-speed oscillator after the STOP mode is released 0: Stop
1: Oscillation
4 R/W 1 Write "1."
3 R 0 This can be read as "0."
2 WUEF R/W 0 Control of warm-up timer (WUP) for oscillator 0 write: don't care 1 write: WUP Start
1 0 PRCK1 PRCK0 R/W R/W 0 0 Select prescaler clock 00: fperiph/16 01: fperiph/8 10: fperiph/4 11: fperiph/2
15 SYSCR1 (0xFFFF_EE01) Bitsymbol Read/Write After reset Function R 0 This can be read as "0."
SYSCR2 (0xFFFF_EE02)
Bitsymbol Read/Write After reset Function
23 DRVOSCH R/W 0 High-speed oscillator current control
0: High capability 1: Low capability
14 SYSCKFLG R 0 System clock status flag 0: High speed (fc) 1: Low speed (fs) 22 R/W 0 Write 0.
13 SYSCK R/W 0 Select system clock 0: High speed (fc) 1: Low speed (fs)
12 FPSEL R/W 0 Select fperiph 0: fgear 1: fc
11 SGEAR R/W 0 Select gear of low-speed clock 0: fs/1 1:fs/2
0 read: WUP finished 1 read: WUP operating 10 9 8 GEAR2 GEAR1 GEAR0 R/W R/W R/W 1 1 1 Select gear of high-speed clock (fc) 000: fc 100: fc4/8 001: fc7/8 101: reserved 010: fc6/8 110: fc2/8 011: fc5/8 111: fc1/8
21 20 WUPT1 WUPT0 R/W R/W 1 0 Select oscillator warm-up time 00: No WUP 01: 2 /Input frequency 10: 214 /Input frequency 11: 216 /Input frequency 28 ALESEL R/W 1 Set ALE output width 0:fsysx1 1:fsysx2
19 18 STBY1 STBY0 R/W R/W 1 1 Select standby mode 00:Reserved 01:STOP 10:SLEEP 11:IDLE
17 R 0 This can be read as "0."
16 DRVE R/W 0 1: Drive the pin even in the STOP mode.
31 SYSCR3 (0xFFFF_EE03) Bitsymbol Read/Write After reset Function R 0 This can be read as "0."
30 29 SCOSEL1 SCOSEL0 R/W R/W 0 1 Select SCOUT output 00:fs 01:fperiph 10:fsys 11:T0
27
26
25
24
0
R 0 0 This can be read as "0."
0
* * *
Don't switch the SYSCK and the GEAR<2:0> simultaneously. If the system enters the STOP mode with SYSCR2 set at 1 (low capability), the setting will change to 0 (high capability) after the STOP mode is released. Make the setting again, as required. SYSCK can be switched when XEN is set to "1."
(Note) Restriction on use of the clock gear When using the clock gear to operate the peripheral I/O, set the SYSCR1 to the frequency division ratio of fc, fc4/8, fc2/8 or fc1/8. If other frequency division ratios are used, the peripheral I/O will not operate properly.
TMP19A64 (rev1.1) 5-5
TMP19A64C1D
5.5
System Clock Controller
By resetting the system clock controller, the controller status is initialized to ="1" and ="111," and the system clock fsys changes to fc/8. (fc=fosc (original oscillation frequency)x4, because the original oscillation is quadrupled by PLL.) For example, when a 13.5-MHz oscillator is connected to the X1 or X2 pin, fsys becomes 6.25 MHz (=13.5x4x1/8) after the reset. Similarly, when the oscillator is not connected and an external oscillator is used to input a clock instead, fsys becomes the frequency obtained from the calculation "input frequencyx4x1/8."
(Note)
Set the initial system clock frequency to 4 MHz or higher.
5.5.1
Oscillation Stabilization Time (Switching between the NORMAL and SLOW modes)
The warm-up timer is provided to confirm the oscillation stability of the oscillator when it is connected to the oscillator connection pin. The warm-up time can be selected by setting the SYSCR2 depending on the characteristics of the oscillator. The SYSCR0 is used to confirm the start and completion of warm-up through software (instruction). After the completion of warm-up is confirmed, switch the system clock (SYSCR1). When clock switching occurs, the current system clock can be checked by monitoring the SYSCR1. Table 5.5.1 shows the warm-up time when switching occurs.
(Note 1) Warm-up is not required when an oscillator is used for the clock and providing stable oscillation. (Note 2) The warm-up timer operates according to the oscillation clock, and it can contain errors if there is any fluctuation in the oscillation frequency. Therefore, the warm-up time should be taken as approximate time.
Table 5.5.1 Warm-up Time
Warm-up time options SYSCR2 01 (28/oscillation frequency) 10 (2 /oscillation frequency) 11 (216/oscillation frequency)
14
High-speed clock (fosc) 18.963 (s) 1.214 (ms) 4.855 (ms)
These values are calculated under the following condition: fosc = 13.5 MHz
TMP19A64 (rev1.1) 5-6
TMP19A64C1D
Transition from the NORMAL mode to the SLOW mode SYSCR1="1" : Switch the system clock to low speed (fs) SYSCR1Read : Confirm that the current state is "1" (the current system clock is fs) SYSCR0="0" : Disable the high-speed oscillation (fosc) Transition from the SLOW mode to the NORMAL mode SYSCR2="xx" SYSCR0="1" SYSCR0="1" SYSCR0 Read SYSCR1="0" : Select the warm-up time : Enable the high-speed oscillation (fosc) : Start the warm-up timer (WUP) : Wait until the state becomes "0" (WUP is finished) : Switch the system clock to high speed (fgear)
SYSCR1Read : Confirm that the current state is "0" (the current system clock is fgear)
(Note)
In the SLOW mode, the CPU operates with the low-speed clock, and the INTC, the backup block, the 2-phase pulse input counter, the KWUP, the IO port and the EBIF (external bus interface) are operable. Stop other internal peripheral functions before the system enters the SLOW mode.
5.5.2
System Clock Pin Output Function
The system clock, fsys, fsys/2 or fs, can be output from the P46/SCOUT pin. By setting the port 4 related registers, P4CR to "1" and P4FC to "1," the P46/SCOUT pin becomes the SCOUT output pin. The output clock is selected by setting the SYSCR3. Table 5.5.2 shows the pin states in each standby mode when the P46/SCOUT pin is set to the SCOUT output.
Table 5.5.2 SCOUT Output State in Each Standby Mode
Mode
SCOUT selection
NORMAL
SLOW
Standby mode IDLE SLEEP STOP
="00" ="01" ="10" ="11" Output the T0 clock.
Output the fs clock. Output the fpriph clock. Output the fsys clock. Output the Fixed to "0." T0 clock.
Fixed to "0" or "1." Fixed to "0."
(Note)
The phase difference (AC timing) between the system clock output by the SCOUT and the internal clock is not guaranteed.
TMP19A64 (rev1.1) 5-7
TMP19A64C1D
5.5.3
Reducing the Oscillator Driving Capability
This function is intended for restricting oscillation noise generated from the oscillator and reducing the power consumption of the oscillator when it is connected to the oscillator connection pin. Setting the SYSCR2 to "1" reduces the driving capability of the high-speed oscillator. (low capability) This is reset to the default setting "0." When the power is turned on, oscillation starts with the normal driving capability (high capability). This is automatically set to the high driving capability state ( ="0") whenever the oscillator starts oscillation due to mode transition. Reducing the driving capability of the high-speed oscillator
fOSC C1 Oscillator C2 X2 pin X1 pin Enable oscillation SYSCR2
Fig. 5.5.1 Oscillator Driving Capability
5.5.4
Clock Frequency Division for Low-Speed System Clock
The low-speed clock (fs) can be divided into two by setting the system control register SYSCR1 to "1." This reduces the power consumption in the SLOW mode. Set the clock frequency division during high-speed oscillation.
TMP19A64 (rev1.1) 5-8
TMP19A64C1D
5.6
Prescaler Clock Controller
Each internal I/O (TMRB0-A, TMRC, SIO0-6 and SBI) has a prescaler for dividing a clock. The clock T0 to be input to each prescaler is obtained by selecting the "fperiph" clock at the SYSCR1 and the SYSCR0 and then dividing the clock according to the setting of SYSCR0. After the controller is reset, fperiph/16 is selected as T0. For details, please refer to Fig. 5.3.1 System Clock Transition Diagram.
5.7
Clock Multiplication Circuit (PLL)
Keep the PLLOFF pin at the "H" level. This pin is the circuit that outputs the fpll clock that is a quadruple of the output clock of the high-speed oscillator, fosc. This lowers the oscillator input frequency while increasing the internal clock speed.
5.8
Flash Access Control Circuit (PFB)
The PFBWAIT register can be used to select the speed of access to the flash memory. You need to set an appropriate flash access speed for the operating frequency to be used.
31 - 2 PFBWAIT (0xFFFF_E500) bit Symbol Read/Write After reset R 0
1 PFBWAIT R/W 1
0
R/W 1
PFBWAIT: WAIT number 11: 4-clock access/10: 3-clock access/01: 2-clock access 00: Setting disabled
Operating frequency (fc) MHz PFBWAIT<1:0> 11 10 01 00 - x - x - 40< 45 <=54
: Settable x: Not settable -: Setting prohibited
Note)
If an appropriate access speed is not specified, the program can operate improperly.
TMP19A64 (rev1.1) 5-9
TMP19A64C1D
5.9
Standby Controller
The TX19A core has several low-consumption modes. To shift to the STOP, SLEEP or IDLE (Halt or Doze) mode, set the RP bit in the CPO status register, and then execute the WAIT instruction. Before shifting to the mode, you need to select the standby mode at the system control register (SYSCR2). The IDLE, SLEEP and STOP modes have the following features: IDLE: Only the CPU is stopped in this mode. The internal I/O has one bit of the ON/OFF setting register for operation in the IDLE mode in the register of each module. This enables operation settings for the IDLE mode. When the internal I/O has been set not to operate in the IDLE mode, it stops operation and holds the state when the system enters the IDLE mode. Table 5.9.1 shows a list of IDLE setting registers.
Table 5.9.1 Internal I/O Setting Registers for the IDLE Mode
Internal I/O TMRB0-A TBT SIO0-6 SBI A/D converter WDT IDLE mode setting register TBxRUN TBTRUN SCxMOD1 SBIBR0 ADMOD1 WDMOD
(Note 1) The Halt mode is activated by setting the RP bit in the status register to "0," executing the WAIT command and shifting to the standby mode. In this mode, the TX19A processor core stops the processer operation while holding the status of the pipeline. The TX19A gives no response to the bus control authority request from the internal DMA, so the bus control authority is maintained in this mode. (Note 2) The Doze mode is activated by setting the RP bit in the status register to "1" and shifting to the standby mode. In this mode, the TX19A processor core stops the processer operation while holding the status of the pipeline. The TX19A can respond to the bus control authority request given from the outside of the processor core. SLEEP: Only the internal low-speed oscillator, the backup block, the 2-phase pulse input counter operate. STOP: All the internal circuits are brought to a stop.
TMP19A64 (rev1.1) 5-10
TMP19A64C1D
5.9.1
CG Operations in Each Mode
Table5.9.1 Status of CG in Each Operation Mode
Clock source Oscillator Mode Normal Slow Idle (Halt) Idle (Doze) Sleep Stop fs only x : ON or clock supply x x Oscillation circuit PLL x Clock supply to peripheral I/O Partial supply (Note) Selectable Selectable Backup block/2-phase pulse input counter x x: OFF or no clock supply x x x x Clock supply to CPU
(Note)
Peripheral functions that can work in the SLOW mode: INTC, external bus interface, IO port, backup block and 2-phase pulse input counter
5.9.2
Block Operations in Each Mode
Table 5.9.2 Block Operating Status in Each Operation Mode
Block NORMAL SLOW IDLE (Doze) x IDLE (Halt) x x x x x x x x x x (Note 1) x (Note 2) x x x SLEEP x x x x x x x x x x x STOP x x x x x x x x x x x x /x (Note 3) BACKUP x x x x x x x x x x x x
TX19A processor core DMAC INTC External bus I/F IO port ADC SIO I2C TMRB TMRC WDT 2-phase counter Backup block KWUP CG High-speed oscillator (fc) Low-speed oscillator (fs) : ON x: OFF
ON/OFF selectable for each module
x x x
* Low-speed oscillation is active when the BVCC is applied, and not active when the BVCC is shut off. (Note 1) The backup RAM is inaccessible in the SLOW mode. (Note 2) When the system enters the SLOW mode, the high-speed oscillator must be stopped by setting the SYSCR1. (Note 3) In the SLOW mode, the backup block operates differently depending on the
BUPMD pin.
TMP19A64 (rev1.1) 5-11
TMP19A64C1D
5.9.3
Releasing the Standby State
The standby state can be released by an interrupt request when the interrupt level is higher than the interrupt mask level, or by the reset. The standby release source that can be used is determined by a combination of the standby mode and the state of the interrupt mask register assigned to the status register in the system control coprocessor (CPO) of the TX19A processor core. Details are shown in Table 5.9.3 Standby Release Sources and Standby Release Operations. Release by an interrupt request Operations of releasing the standby state using an interrupt request vary depending on the interrupt enabled state. If the interrupt level specified before the system enters the standby mode is equal to or higher than the value of the interrupt mask register, an interrupt handling operation is executed by the trigger after the standby is released, and the processing is started at the instruction next to the standby shift instruction (WAIT instruction). If the interrupt request level is lower than the value of the interrupt mask register, the processing is started with the instruction next to the standby shift instruction (WAIT instruction) without executing an interrupt handling operation. (The interrupt request flag is maintained at "1".) For a nonmaskable interrupt, an interrupt handling is executed after the standby state is released irrespectively of the mask register value. Release by the reset Any standby state can be released by the reset. Note that releasing of the STOP mode requires sufficient reset time to allow the oscillator operation to become stable. (Refer to Table 5.1.) When the standby mode is released by the reset, data in the backup RAM can maintain the state immediately before the standby state is started, but other settings will be initialized. (When the standby mode is released by an interruption, the state immediately before the standby state is started will be maintained.) Please refer to "6. Interrupt" for details of interrupts for STOP, SLEEP and IDLE release and ordinary interrupts.
TMP19A64 (rev1.1) 5-12
TMP19A64C1D
Table 5.9.3 Standby Release Sources and Standby Release Operations
(Interrupt level)>(Interrupt mask) Interrupt accepting state Standby mode INTWDT INT0-B Standby release source (Note 1) KWUP0-7 Interrupt (Note 1) INTRTC INTTBA (Note 2) INTTB0-9 INTRX0-6, TX0-6 INTS INTAD/ADHP/ADM x x x x x x x x x x x x x Interrupt enabled EI= "1" IDLE SLEEP STOP (programmable) x x Interrupt disabled EI= "0" IDLE SLEEP STOP (programmable) - - (Note 1) (Note 1) x x x x x
x -
: Starts the interrupt handling after the standby mode is released. (The LSI is initialized by the reset.) : Starts the processing at the address next to the standby instruction (without executing the interrupt handling) after the standby mode is released. : Cannot be used for releasing the standby mode : Cannot execute masking with an interruption mask when a nonmaskable interrupt is selected.
(Note 1) The standby mode is released after the warm-up time has elapsed. (Note 2) These operations are applicable only when the 2-phase pulse input counter mode is selected. If any other modes are selected, the operations will be the same as those for the INTTB0 to INTTB9. To release the standby mode by using the level mode interrupt in the interruptible state, keep the level until the interrupt handling is started. Changing the level before then will prevent the interrupt processing from starting properly. To enter the standby mode when the CPU has disabled the acceptance of interrupts, disable interrupts other than the recovery factors in advance by using the interrupt controller (INTC). Otherwise, the standby mode can be released by any other interrupts than the recovery factors. To recover from the standby mode when the CPU has disabled the acceptance of interrupts, set the interrupt level higher than the interrupt mask (Interrupt level > Interrupt mask). If the interrupt level is equal to or lower than the interrupt mask (Interrupt level Interrupt mask), the system cannot recover from the standby mode.
TMP19A64 (rev1.1) 5-13
TMP19A64C1D
5.9.4
STOP Mode
In the STOP mode, all the internal circuits, including the internal oscillators, are brought to a stop. The pin states in the STOP mode vary depending on the setting of the SYSCR2. Table 5.9.6 shows the pin states in the STOP mode. When the STOP mode is released, the system clock output is started after the elapse of warm-up time at the warm-up counter to allow the internal oscillators to stabilize. After the STOP mode is released, the system returns to the operation mode that was active immediately before the STOP mode (NORMAL or SLOW), and starts the operation. It is necessary to make these settings before the instruction to enter the STOP mode is executed. Specify the warm-up time at the SYSCR2.
(Note)
To shift from the NORMAL mode to the STOP mode on the TMP19A64, do not set the SYSCR2 to "00" or "01" for the warm-up time setting. The internal system recovery time cannot be satisfied when the system recovers from the STOP mode.
Table 5.9.4 Warm-up Settings for Transitions of Operation Modes
Transition of operation mode NORMAL IDLE NORMAL SLEEP NORMAL SLOW NORMAL STOP IDLE NORMAL SLEEP NORMAL SLEEP SLOW SLOW NORMAL SLOW SLEEP SLOW STOP STOP NORMAL STOP SLOW Warm-up setting Not required Not required Not required Not required Not required Required Not required Required (Note 1) Not required Not required Required Not required
Note 1) When the high-speed oscillator is stopped in the SLOW mode
TMP19A64 (rev1.1) 5-14
TMP19A64C1D
(NOTE)19A64 requires a recovery time from Warming up state as following
RESET
Reset Release IDLE Mode (CPU Stop) (Selective I/O ) Software Interrupt Softwar NORMAL Mode (fc/ gear)
A
Software
F
SLEEP Mode (fs)
C Interrupt
Softwar G
Interrupt
E
STOP Mode
SLOW Mode (fs)
Soft
B Interrupt
Softwar
D Interrupt
H
All Stoped
WUP Trigger
State Transition Diagram State Running Mode after WUP Minimum required Operation time Transition before WAIT instruction done (sec)
STOP release
A B C D
STOP/SLEEP STOP/SLEEP STOP/SLEEP STOP/SLEEP
64 / fsys in NOMAL mode 16 / fsys in SLOW mode 64 / fsys in NOMAL mode -
SLEEP release
TMP19A64 (rev1.1) 5-15
TMP19A64C1D
5.9.5
1.
Recovery from the STOP or SLEEP Mode
Transition of operation modes: NORMAL STOP NORMAL
System clock off fsys (High-speed clock) mode CG (High-speed clock) Start of high-speed clock oscillation Warm-up (W-up) Start of warm-up End of warm-up
NORMAL
STOP
NORMAL
when @fosc=13.5 MHz
Selection of warm-up time SYSCR2 01 (28/fosc) 10 (214/fosc) 11 (216/fosc) Warm-up time (fosc) Setting disabled 1.214 ms 4.855 ms
(Note)
When @fosc=13.5 MHz, the internal system recovery time cannot be satisfied. Do not set to "01."
2.
Transition of operation modes: NORMAL SLEEP NORMAL
System clock off
fsys (High-speed clock) mode
NORMAL
SLEEP
NORMAL
CG (High-speed clock)
CG (Low-speed clock)
Low-speed clock
(fs) continues oscillation
Warm-up (W-up)
Start of high-speed clock oscillation Start of warm-up
End of warm-up
when @fosc=13.5 MHz
Selection of warm-up time SYSCR2 01 (28/fosc) 10 (214/fosc) 11 (216/fosc) Warm-up time (fosc) Setting disabled 1.214 ms 4.855 ms
(Note)
When @fosc=13.5 MHz, the internal system recovery time cannot be satisfied. Do not set to "01."
TMP19A64 (rev1.1) 5-16
TMP19A64C1D
3.
Transition of operation modes: SLOW STOP SLOW
fsys (Low-speed clock) mode
System clock off SLOW STOP SLOW
CG (fs) (Low-speed clock)
(Note)
The low-speed clock (fs) continues oscillation. There is no need to make a warm-up setting.
4.
Transition of operation modes: SLOW SLEEP SLOW
fsys (Low-speed clock) mode
System clock off SLOW STOP SLOW
CG (fs) (Low-speed clock)
(Note)
The low-speed clock (fs) continues oscillation. There is no need to make a warm-up setting.
TMP19A64 (rev1.1) 5-17
TMP19A64C1D
Table 5.9.6 Pin States in the STOP Mode in Each State of SYSCR2 (1/2)
Pin name P00-P07 Input/output Input mode Output mode AD0-AD7, D0-D7 Input mode Output mode, A8-A15 AD8-AD15, D8-D15 Input mode Output mode, A0-A7/A16-A23 Output pin Input mode Output mode, /HWR, /BUSAK, R/W_ Input mode, /WAIT, /RDY Output mode Input mode Output mode BUSRQ Input mode Output mode ALE (Output mode) Input mode Output mode, CS0-CS5 Input mode Output mode Input mode Output mode Input mode Output mode, A0-A7 Input mode Output mode, A8-A15 Input pin, AN0-AN23 Input mode Output mode INT5-INT8 (Input mode) Input mode Output mode, TB0OUT,TB1-3OUT Input mode, TBAIN1 Output mode, TB4-9OUT Input mode, SCLK0-1, RXD0-2, /CTS0-1 Output mode, SCLK0-1,TXD0-2 Input mode, SCLK2-4, RXD3-4, /CTS2-4 Output mode, SCLK2-4,TXD3-4 Input mode Output mode INT9 (Input mode) Input mode, SCLK5, RXD5, /CTS5 Output mode, SCLK5, TXD5 Input mode Output mode Input mode Output mode INTA-INTB (Input mode) =0 PU* PU* PU* PU* PU* PU* PU* "L" level output PU* PU* Input Input Input =1 Output Output Output Output Output Output Output Output Output "L" level output Input Output Input Output Input Output Output Output Input Output Input Input Output Input Output Input Output Input Output Input Output Input Input Output Input Output Input Output Input
P10-P17
P20-P27 P30 (/RD), P31 (/WR) P32, P35, P36 P33 P34
P37 (ALE)
P40-P45 P46 (SCOUT) P47 P50-P57 P60-P67 P7, P8, P9 PA0, PA1, PA3, PA4
cPA2, PA5, PA6, PA7 PB0-PB7 PC0-PC7
PD0-PD6
PD7
PE0-PE2 PE3-PE5 PE6-PE7
TMP19A64 (rev1.1) 5-18
TMP19A64C1D
Table 5.9.6 Pin States in the STOP Mode in Each State of SYSCR2 (2/2)
Pin name PF0-PF7 Input/Output Input mode, SDA, SI, SCL, SCK, /DREQ2-, TBTIN Output mode, SO, SDA, SCL, SCK, /DACK2-3 Input mode, TC0-3IN Output mode, TCOUT0-3 Input mode Output mode, TCOUT4-9 Input mode Output mode Input mode Output mode INT0-INT4 (Input mode) Input mode, /DREQ2-3 Output mode, /DACK2-3 Input mode Output mode KEY0-KEY7 (Input mode) Input mode Output mode Input mode Output mode INT0-INT4 (Input mode) Input mode, RXD6, /CTS6 Output mode, TXD6, Input mode Output mode TPD0-7, TPC0-7 Input pin Input pin Input pin Input pin Input pin Input pin Input pin Input pin Input pin Input pin Input pin Output pin =0 Input Input Input Output Input Input Input Input Input Input Input Input Input Input "H" level output =1 Input Output Input Output Input Output Input Output Input Output Input Input Output Input Output Input Input Output Input Output Input Input Output Input Output Output Input Input Input Input Input Input Input Input Input Input "H" level output
PG0-PG7 PH0-PH5 PH6-PH7 PI0-PI4
PJ0-PJ3 PK0-PK7
PL, PM, PN PO0-PO4
PO5-PO7 PP, PQ
NMI PLLOFF RESET BUPMD BRESET BUSMD ENDIAN BOOT BW0-1 TEST1-3 X1 X2
: Indicates that the input is disabled for the input mode and the input pin and the impedance becomes high for the output mode and the output pin. Note that the input is enabled when the port function register (PxFC) is "1" and the port control register (PxCR) is "0." : The input gate is active. To prevent the input pin from floating, fix the input voltage to the "L" or "H" level. : This is the programmable pull-up pin. The input gate is always disabled. No feedthrough current flows even if the high impedance is selected.
Input
Output : The pin is in the output state. PU*
TMP19A64 (rev1.1) 5-19
TMP19A64C1D
6.
6.1
Interrupts
Overview
The features of the TX19A64 interrupts are as follows: * * * * * * 2 interrupts from the CPU itself (software interrupt instruction) 21 external pins ( NMI , INT0 to INTB, KWUP0 to 7) 51 interrupts from internal I/O (including WDT interrupt) Generation of vectors for each interrupt factor Seven interrupt levels for each interrupt factor An interrupt can be used to activate the DMAC.
(1) Preparation for interrupt settings * Settings required before generating interrupts: Set the exception table base address (the base address of the table of maskable interrupt jump addresses) to IVR. Set the interrupt jump addresses to the "exception table base address + IVR offset address" memory. Set Status of the CP0 register to "0x111." * For details of the Status register, refer to the material "TX19A Core Architecture."
TMP19A64(rev1.1) 6-1
TMP19A64C1D
CG Detection circuit 3 NMI WDT Write Bus Error Active H level 15 Rising edge 15 Rising edge H level Status register 15 1 1 1 INTTBA TMRB H/L level or edge setting 12
INTC
INT0 to B
IMCxx register Core
RTC
15 INTnEN Standby clear control
IMCGxx register
Other interrupts
KWUP H/L level or edge setting
Input enable/disable for each interrupt factor KWUP0 to 7 register KWUP
KWUP0 to 7
Fig. 6.1.1 Interrupt Connection Diagram
TMP19A64(rev1.1) 6-2
TMP19A64C1D
(2) Interrupts from external pins (INT0 - INTB and KWUP0-7) When any external interrupt is to be used for setting to clear the Standby mode, use the following steps: Set ports Set functions Set CG Clear the EICRCG and INTCLR registers of CG Enable interrupts with INT a) INT0 - INTB If it is used to clear the Stop mode: IMCGx = "xxx" IMCGx = "1" : Set the standby clear request of each interrupt (INT0-B) to "active" (Refer to INTCG register). : Set the clear input of each interrupt (INT0-B) to "enable" (Refer to INTCG register). : Clear each interrupt request (INT0-B) (Refer to INTCG register).
EICRCG = "xxxx"
INTCLR = "000000100" : Clear interrupt requests INT0-B (Refer to INTCG register). IMCx b) KWUP0-7 If it is used to clear the Stop mode: IMCGD = "01" IMCGD = "1" IMC3 IMC3
INTCLR
= "01"
: Set each interrupt request (INT0-B) to the H level (Refer to INTC register).
: Set the KWUP standby clear request to "active" (Refer to INTCG register). : Set the KWUP clear input to "enable" (Refer to INTCG register). : Set KWUP interrupt request to the H level (Refer to INTC register). : Clear KWUP interrupt request (Refer to INTCG register). (Refer to INTCG register).
= "01" = "01"
= "000110100" : Clear KWUP interrupt request
KWUPST = "1"
: Set each KWUP interrupt factor to Enable (Refer to KWUP register).
Table 6.1.2 Registers to be Set for Detecting Interrupts
Interrupt INT0 - INTB,KWUP Interrupt detection levels that can be used When in use, set to a rising edge in INTC (if edge detection is set for CG) or to "H" level (if level detection is set for CG). Set the active state in CG. The "L" level, "H" level, falling edge, or rising edge setting can be selected in CG register.
Internal I/O (Note 1)
Others
Falling edge
Interrupt level 0 means that the interrupt is disabled.
TMP19A64(rev1.1) 6-3
TMP19A64C1D
(3) Interrupt operation Basic interrupt handling In the interrupt handler (Refer to Table 6.2.1 Interrupt Jump Address for the starting address of the interrupt handler): * * * Read the IVR value (in the figure, IVR value is 0x8000) Substitute the IVR value for ICLR to clear the interrupt factor. Obtain the exception handling jump address by using the IVR value (in the figure, it is 0x8000) as the corresponding address in the table (in the figure, the "jump to" address is 0x9000). Jump to the exception handling routine using the "jump to" address.
*
In the interrupt processing routine: * * * Execute the interrupt processing Set ILEV = 0 to return to the mask level before the exception is generated. Command "ERET" to return to the routine before the exception is generated.
Note that interrupts are disabled during the exception handling except for the case multiple interrupts are allowed.
memory IVR 0x8000 0x8000 0x9000
0x9000 Exception handler
Fig. 6.1.3 Process Flow in the Interrupt Handler
TMP19A64(rev1.1) 6-4
TMP19A64C1D
6.2
Interrupt Factor
The starting address of an exception handler is defined as "exception vector address." The exception vector address for a reset exception and non-maskable interrupts is 0xBFC0_0000. The exception vector address for a debug exception is 0xBFC0_0480 (EJTAG ProbEn = 0). For other exceptions, the corresponding exception vector addresses are determined depending on the BEV bit of Status register [23] and the IV bit of the Cause register [23] of the system control coprocessor register (CP0). Table 6.2.1 Interrupt Branch Address
BEV=0 Exception Reset EJTAG Debug (En=0) EJTAG Debug (En=1) Interrupt (IV=0) Interrupt (IV=1) All others Virtual address 0xBFC0_0000 0xBFC0_0480 0xFF20_0200 0x8000_0180 0x8000_0200 0x8000_0180 Logical address 0x1FC0_0000 0x1FC0_0480 0xFF20_0200 0x0000_0180 0x0000_0200 0x0000_0180 0xBFC0_0000 0xBFC0_0480 0xFF20_0200 0xBFC0_0380 0xBFC0_0400 0xBFC0_0380 BEV=1 Virtual address Logical address 0x1FC0_0000 0x1FC0_0480 0xFF20_0200 0x1FC0_0380 0x1FC0_0400 0x1FC0_0380
(Note 1) (Note 2)
If vector addresses are to be placed in the internal ROM, set the status bit of the system control coprocessor register (CP0) to "1." The "software interrupt," which is a maskable interrupt, can be generated by setting IP [1:0] of the Cause register of CP0. This "software interrupt" is different from the "software set," which is one of the hardware interrupt factors. The "software set" interrupt is generated by setting of the IMC0 register in the interrupt controller (INTC) to any value other than "0."
TMP19A64(rev1.1) 6-5
TMP19A64C1D
Table 6.2.2 List of Hardware Interrupt Factors
Interrupt Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 IVR[8:0] 0x000 0x004 0x008 0x00C 0x010 0x014 0x018 0x01C 0x020 0x024 0x028 0x02C 0x030 0x034 0x038 0x03C 0x040 0x044 0x048 0x04C 0x050 0x054 0x058 0x05C 0x060 0x064 0x068 0x06C 0x070 0x074 0x078 0x07C 0x080 0x084 0x088 0x08C 0x090 0x094 0x098 0x09C 0x0A0 0x0A4 0x0A8 0x0AC 0x0B0 0x0B4 0x0B8 0x0BC 0x0C0 0x0C4 0x0C8 0x0CC 0x0D0 0x0D4 0x0D8 0x0DC 0x0E0 0x0E4 0x0E8 0x0EC 0x0F0 0x0F4 0x0F8 0x0FC Software set INT0 pin INT1 pin INT2 pin INT3 pin INT4 pin INT5 pin INT6 pin INT7 pin INT8 pin INT9 pin INTA pin INTB pin KWUP INTRX0 INTTX0 INTRX1 INTTX1 INTRX2 INTTX2 INTSBI INTADHP INTADM INTTB0 INTTB1 INTTB2 INTTB3 INTTB4 INTCAPG INTCMP0 INTCMP1 INTCMP2 INTCMP3 INTCMP4 reserved INTRX3 INTTX3 INTRX4 INTTX4 INTRX5 INTTX5 INTRX6 INTTX6 INTTB5 INTTB6 INTTB7 INTTB8 INTTB9 INTTBA INTCMP5 INTCMP6 INTCMP7 INTCMP8 INTCMP9 INTRTC INTAD INTDMA0 INTDMA1 INTDMA2 INTDMA3 INTDMA4 INTDMA5 INTDMA6 INTDMA7 Interrupt Factor Interrupt Control Register IMC0 Address 0xFFFF_E000
IMC1
0xFFFF_E004
IMC2
0xFFFF_E008
IMC3 : Serial receiving (channel.0) : Serial transmit (channel.0) : Serial receiving (channel.1) : Serial transmit (channel.1) : Serial receiving (channel.2) : Serial transmit (channel.2) : Serial bus interface 0 : Highest priority ADC complete interrupt : ADC monitor function interrupt : 16-bit timer 0 : 16-bit timer 1 : 16-bit timer 2 : 16-bit timer 3 : 16-bit timer 4 : Input capture group : Compare interrupt 0 : Compare interrupt 1 : Compare interrupt 2 : Compare interrupt 3 : Compare interrupt 4 : Serial receiving (channel.3) : Serial transmit (channel.3) : Serial receiving (channel.4) : Serial transmit (channel.4) : Serial receiving (channel.5) : Serial transmit (channel.5) : Serial receiving (channel.6) : Serial transmit (channel.6) : 16-bit timer 5 : 16-bit timer 6 : 16-bit timer 7 : 16-bit timer 8 : 16-bit timer 9 : 16-bit timer A : Compare interrupt 5 : Compare interrupt 6 : Compare interrupt 7 : Compare interrupt 8 : Compare interrupt 9 : Clock timer : ADC completed : Completion of DMA transfer : Completion of DMA transfer : Completion of DMA transfer : Completion of DMA transfer : Completion of DMA transfer : Completion of DMA transfer : Completion of DMA transfer : Completion of DMA transfer
0xFFFF_E00C
IMC4
0xFFFF_E010
IMC5
0xFFFF_E014
IMC6
0xFFFF_E018
IMC7
0xFFFF_E01C
IMC8
0xFFFF_E020
IMC9
0xFFFF_E024
IMCA
0xFFFF_E028
IMCB
0xFFFF_E02C
IMCC
0xFFFF_E030
IMCD
0xFFFF_E034
(channel.0) (channel.1) (channel.2) (channel.3) (channel.4) (channel.5) (channel.6) (channel.7)
IMCE
0xFFFF_E038
IMCF
0xFFFF_E03C
TMP19A64(rev1.1) 6-6
TMP19A64C1D
Table 6.2.3 Interrupt Factors to Cancel Stop/Sleep/Idle Modes
Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Interrupt Factor INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 INT9 INTA INTB KWUP INTRTC INTTBA reserved Note External interrupt 0 External interrupt 1 External interrupt 2 External interrupt 3 External interrupt 4 External interrupt 5 External interrupt 6 External interrupt 7 External interrupt 8 External interrupt 9 External interrupt A External interrupt B Key on wake up interrupt Clock timer interrupt Two-phase pulse input counter interrupt
* Number 0 to 13 interrupt factors can cancel Stop/Sleep modes. * Number 14 interrupt factor can cancel the Sleep mode. * Each factor can clear the IDLE mode.
TMP19A64(rev1.1) 6-7
TMP19A64C1D
6.3
Interrupt Detection
If any interrupt is used to cancel the Stop mode, interrupt active states of INT0 to INTB must be set in the EMCGxx field of the IMCGx register in CG and the EIMxx of the IMCx register in INTC must be set to "H" level. For KWUP0 to 7, the EMCG field of the IMCGD register in CG must be set to "H" and the EIMxx field of the IMCx register in INTC must be set to "H" level. The active state as well as enable/disable is set in KWUPSTn for each interrupt. For setting other interrupts, the EIMxx field of the IMCx register in INTC is used. Four types of active states, "H" level, "L" level, rising edge, and falling edge, are used. When the interrupt detection circuit of TMP19A64 recognizes that any input state matches with the predefined active state, it notifies the processor core or INTC of an interrupt request. If the interrupts that can be used to cancel the Stop mode are not to be used for canceling Stop mode, it is unnecessary to configure them in CG. In this case, INT0 to INTB can be set only by INTC and KWUP0 to 7 can be set in INTC and KWUPSTx. The interrupt signal is negated by the interrupt handler after the interrupt factor is identified. In the case of INT0 to INTB, appropriate values are written to the ICRCG field of the EICRCG register and to the EICLR field of the INTCLR register in INTC. KWUP0 to 7 are negated by setting KWUPCLR. Other interrupt signals are negated by writing a given value in the EICLR field of the INTCLR register in the INTC. To negate the interrupt factor whose active state is level-sensitive, an external circuit that has asserted the INTx signal must be operated so that it negates INTx. However, please ensure that the level input is not negated until the specified interrupt vector (IVR) has been read. (Note) Please ensure that each setting is performed in the order of setting the active state, clearing an interrupt request, and enabling an interrupt. (Example INT0 setting to cancel Stop mode) IMCGA EICRCG IMCGA IMC0 INTCLR IMC0 Status = "1," = "10" = "0000" = "1" = "01" = "000000100" = "101" = "xxx" : : : : : : Set INT0 active state to falling edge. Clear the INT0 interrupt request. Enable INT0 cancel input. Set INT0 to "H" level. Clear the INT0 interrupt request. Set the interrupt level of "5." TX19A processor core
TMP19A64(rev1.1) 6-8
TMP19A64C1D
6.4
Interrupt Priority Arbitration
(1) Seven levels of interrupt priority Seven levels of priority are available and each interrupt factor can be assigned to one of these levels. The interrupt level is set by the interrupt mode control register (IMCx) which has a 3-bit field (ILx) for level settings. The greater the value (interrupt level) set in IMCx , the higher the priority. If the value is set to "000" meaning the interrupt level of 0, no interrupts will be generated by the factor. (2) Interrupt level notification If an interrupt is generated, the INTC notifies the TX19A processor core of the interrupt level. The TX19A processor core identifies the interrupt level by reading the values in the IP field in the Cause register. If two or more interrupts (with different interrupt levels) are generated simultaneously, the INTC notifies the TX19A processor core of the highest-level interrupt factor and the lower level interrupt factors are suspended. (3) Interrupt vector (notification of interrupt factor) If an interrupt is generated, the INTC sets the corresponding interrupt factor vector in the vector register (IVR). The TX19A processor core identifies the interrupt factor by reading the vector register value. If two or more interrupts (with the same interrupt level) are generated simultaneously, the INTC notifies the TX19A processor core of the factor of which request number is younger. When no interrupt factors have been generated, the IVR <8:2> field is "0" (By clearing interrupt requests, the IVR register is cleared to "0.")
TMP19A64(rev1.1) 6-9
TMP19A64C1D
6.5
INTC Register
Table 6.5.1 INTC Register Map
Address 0xFFFF_E000 0xFFFF_E004 0xFFFF_E008 0xFFFF_E00C 0xFFFF_E010 0xFFFF_E014 0xFFFF_E018 0xFFFF_E01C 0xFFFF_E020 0xFFFF_E024 0xFFFF_E028 0xFFFF_E02C 0xFFFF_E030 0xFFFF_E034 0xFFFF_E038 0xFFFF_E03C 0xFFFF_E040 0xFFFF_E060 0xFFFF_E10C Register symbol IMC0 IMC1 IMC2 IMC3 IMC4 IMC5 IMC6 IMC7 IMC8 IMC9 IMCA IMCB IMCC IMCD IMCE IMCF IVR INTCLR ILEV Register Interrupt mode control register 0 Interrupt mode control register 1 Interrupt mode control register 2 Interrupt mode control register 3 Interrupt mode control register 4 Interrupt mode control register 5 Interrupt mode control register 6 Interrupt mode control register 7 Interrupt mode control register 8 Interrupt mode control register 9 Interrupt mode control register A Interrupt mode control register B Interrupt mode control register C Interrupt mode control register D Interrupt mode control register E Interrupt mode control register F Interrupt vector register Interrupt request clear register Interrupt level register Corresponding interrupt number 3-0 7-4 11 - 8 15 - 12 19 - 16 23 - 20 27 - 24 31 - 28 35 - 32 39 - 36 43 - 40 47 - 44 51 - 48 55 - 52 59 - 56 63 - 60
(Note)
Unless otherwise specified, the above registers must be 32-bit accessed for both reading and writing.
TMP19A64(rev1.1) 6-10
TMP19A64C1D
6.5.1
Interrupt Vector Register (IVR)
The vector of each interrupt factor to be generated is listed below. 7 6
IVR6
5
IVR5
4
IVR4
3
IVR3
2
IVR2 0
1
IVR1 0
0
IVR0 0
IVR (0xFFFF_E040)
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
IVR7 0
R 0 0 0 0 The vector of the interrupt factor generated is set.
15
0
14
0
13
0
12
R/W 0
11
0
10
0
9
0
8
IVR8 R 0 The vector of the interrupt factor generated is set.
23
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function 0
22
0
21
0
20
R/W 0
19
0
18
0
17
0
16
0
31
0
30
0
29
0
28
R/W 0
27
0
26
0
25
0
24
0
TMP19A64(rev1.1) 6-11
TMP19A64C1D
6.5.2
Interrupt Level Register
7 6 5 4 3
0 Always reads "0."
2
1
0
ILEV bit Symbol (0xFFFF_E10C) Read/Write After reset Function
0 Always reads "0."
PMASK0 R 000 Interrupt mask level (previous) 0
CMASK R/W (Note 1) 000 Interrupt mask level (current)
15
bit Symbol Read/Write After reset Function 0 Always reads "0."
14
13
PMASK2
12
R
11
0 Always reads "0."
10
9
PMASK1
8
000 Interrupt mask level (previous) 2
000 Interrupt mask level (previous) 1
23
bit Symbol Read/Write After reset Function 0 Always reads "0."
22
21
PMASK4
20
R
19
0 Always reads "0."
18
17
PMASK3
16
000 Interrupt mask level (previous) 4
000 Interrupt mask level (previous) 3
31
bit Symbol Read/Write After reset Function MLEV W 0 Interrupt level change
0: Decrement the interrupt level by 1 1: Change CMASK
30
29
PMASK6
28
27
R 0 Always reads "0."
26
25
PMASK5
24
000 Interrupt mask level (previous) 6
000 Interrupt mask level (previous) 5
Note) Note)
This register must be 32-bit accessed. When a new interrupt is generated, the corresponding interrupt level is stored in CMASK and any previously stored values are shifted in their mask levels such that the previous CMASK is saved in PMASK0 and PMASK0 is saved in PMASK1 and so on. Upon setting MLEV to "1," set the CMASK value simultaneously. The PMASKx values are unchanged. When is set to "0," the interrupt mask levels in the register shift back to the previous state such that PMASK0 is moved to CMASK and PMASK1 is moved to PMASK0, and so on. The last is set to "000." If it is to be used after the interrupt process, set MLEV to "0" before executing the ERET command.
Note 1) Note)
TMP19A64(rev1.1) 6-12
TMP19A64C1D
6.5.3
Transition of Interrupt Mask Level
The transition sequence of the interrupt level register is illustrated below.
PMASK6 PMASK5 PMASK4 PMASK3 PMASK2 PMASK1 PMASK0 CMASK
Interrupt processing
PMASK6 PMASK5 PMASK4 PMASK3 PMASK2 PMASK1 PMASK0
New interrupt level
CMASK
MLEV="0"
"000"
PMASK6 PMASK5 PMASK4 PMASK3 PMASK2 PMASK1 PMASK0 CMASK
Fig. 6.5.3 Transition of Interrupt Mask Level
TMP19A64(rev1.1) 6-13
TMP19A64C1D
6.5.4
Interrupt Level Register (IMCx)
The interrupt level, active state, and whether it is a factor to activate DMAC or not are set for each interrupt factor. 7 6
EIM01
5
4
DM0 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 0 is set as the activation factor
3
R 0 Always reads "0."
2
IL02
1
IL01 R/W 0
0
IL00
IMC0 (0xFFFF_E000)
bit Symbol Read/Write After reset Function
R 0 Always reads "0."
EIM00 R/W 0 0 Selects active state of interrupt request: 00: "L" level 01: Disable 10: Disable 11: Disable Be sure to set "00."
0 0 If DM0 = 0, select the interrupt level for interrupt number 0 (software set). 000: Disable Interrupt 001 to 111: 1 to 7 If DM0 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM11
13
12
DM1 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 1 to be the activation factor.
11
R 0 Always reads "0."
10
IL12
9
IL11 R/W 0
8
IL10
EIM10 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM1 = 0, select the interrupt level for interrupt number 1 (INT0). 000: Disable Interrupt 001 to 111: 1 to 7 If DM1 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM21
21
20
DM2 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 2 to be the activation factor.
19
R 0 Always reads "0."
18
IL22
17
IL21 R/W 0
16
IL20
EIM20 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM2 = 0, select the interrupt level for interrupt number 2 (INT1). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM31
29
28
DM3 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 3 to be the activation factor.
27
R 0 Always reads "0."
26
IL32
25
IL31 R/W 0
24
IL30
EIM30 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM3 = 0, select the interrupt level for interrupt number 3 (INT2). 000: Disable Interrupt 001 to 111: 1 to 7 If DM3 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
TMP19A64(rev1.1) 6-14
TMP19A64C1D
7
IMC1 bit Symbol (0xFFFF_E004) Read/Write After reset Function R 0 Always reads "0."
6
EIM41
5
4
DM4 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 4 is set as the activation factor
3
R 0 Always reads "0."
2
IL42
1
IL41 R/W 0
0
IL40
EIM40 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM4 = 0, select the interrupt level for interrupt number 4 (INT3) 000: Disable Interrupt 001 to 111: 1 to 7 If DM4 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM51
13
12
DM5 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 5 to be the activation factor.
11
R 0 Always reads "0."
10
IL52
9
IL51 R/W 0
8
IL50
EIM50 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM5 = 0, select the interrupt level for interrupt number 5 (INT4). 000: Disable Interrupt 001 to 111: 1 to 7 If DM5 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM61
21
20
DM6 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 6 to be the activation factor.
19
R 0 Always reads "0."
18
IL62
17
IL61 R/W 0
16
IL60
EIM60 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM6 = 0, select the interrupt level for interrupt number 6 (INT5). 000: Disable Interrupt 001 to 111: 1 to 7 If DM6 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM71
29
28
DM7 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 7 to be the activation factor.
27
R 0 Always reads "0."
26
IL72
25
IL71 R/W 0
24
IL70
EIM70 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM7 = 0, select the interrupt level for interrupt number 7 (INT6). 000: Disable Interrupt 001 to 111: 1 to 7 If DM7 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
TMP19A64(rev1.1) 6-15
TMP19A64C1D
7
IMC2 bit Symbol (0xFFFF_E008) Read/Write R After reset 0 Function Always reads "0."
6
EIM81
5
4
DM8 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 8 is set as the activation factor
3
R 0 Always reads "0."
2
IL82
1
IL81 R/W 0
0
IL80
EIM80 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM8 = 0, select the interrupt level for interrupt number 8 (INT7). 000: Disable Interrupt 001 to 111: 1 to 7 If DM8 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM91
13
12
DM9 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 9 to be the activation factor.
11
R 0 Always reads "0."
10
IL92
9
IL91 R/W 0
8
IL90
EIM90 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DM9 = 0, select the interrupt level for interrupt number 9 (INT8). 000: Disable Interrupt 001 to 111: 1 to 7 If DM9 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIMA1
21
20
DMA 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 10 to be the activation factor.
19
R 0 Always reads "0."
18
ILA2
17
ILA1 R/W 0
16
ILA0
EIMA0 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DMA = 0, select the interrupt level for interrupt number 10 (INT9). 000: Disable Interrupt 001 to 111: 1 to 7 If DMA = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIMB1
29
28
DMB 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 11 to be the activation factor.
27
R 0 Always reads "0."
26
ILB2
25
ILB1 R/W 0
24
ILB0
EIMB0 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DMB = 0, select the interrupt level for interrupt number 11 (INTA) 000: Disable Interrupt 001 to 111: 1 to 7 If DMB = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
TMP19A64(rev1.1) 6-16
TMP19A64C1D
7
IMC3 bit Symbol (0xFFFF_E00C) Read/Write After reset Function R 0 Always reads "0."
6
EIMC1
5
4
DMC 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 12 is set as the activation factor
3
R 0 Always reads "0."
2
ILC2
1
ILC1 R/W 0
0
ILC0
EIMC0 R/W 0 0 Selects active state of interrupt request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0 0 If DMC = 0, select the interrupt level for interrupt number 12 (INTB) 000: Disable Interrupt 001 to 111: 1 to 7 If DMC = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIMD1
13
12
DMD 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 13 to be the activation factor.
11
R 0 Always reads "0."
10
ILD2
9
ILD1 R/W 0
8
ILD0
EIMD0 R/W 0 0 Selects active state of interrupt request. 01: "H" level Be sure to set "01."
0 0 If DMD = 0, select the interrupt level for interrupt number 13 (KWUP) 000: Disable Interrupt 001 to 111: 1 to 7 If DMD = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIME1
21
20
DME 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 14 to be the activation factor.
19
R 0 Always reads "0."
18
ILE2
17
ILE1 R/W 0
16
ILE0
EIME0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DME = 0, select the interrupt level for interrupt number 14 (INTRX0) 000: Disable Interrupt 001 to 111: 1 to 7 If DME = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIMF1
29
28
DMF 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 15 to be the activation factor.
27
R 0 Always reads "0."
26
ILF2
25
ILF1 R/W 0
24
ILF0
EIMF0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DMF = 0, select the interrupt level for interrupt number 15 (INTTX0) 000: Disable Interrupt 001 to 111: 1 to 7 If DMF = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
TMP19A64(rev1.1) 6-17
TMP19A64C1D
7
IMC4 (0xFFFF_E010) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
EIM101
5
4
DM10 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 16 is set as the activation factor
3
R 0 Always reads "0."
2
IL102
1
IL101 R/W 0
0
IL100
EIM100 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM10 = 0, select the interrupt level for interrupt number 16 (INTRX1) 000: Disable Interrupt 001 to 111: 1 to 7 If DM10 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM111
13
12
DM11 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 17 to be the activation factor.
11
R 0 Always reads "0."
10
IL112
9
IL111 R/W 0
8
IL110
EIM110 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM11 = 0, select the interrupt level for interrupt number 17 (INTTX1) 000: Disable Interrupt 001 to 111: 1 to 7 If DM11 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM121
21
20
DM12 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 18 to be the activation factor.
19
R 0 Always reads "0."
18
IL122
17
IL121 R/W 0
16
IL120
EIM120 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM12 = 0, select the interrupt level for interrupt number 18 (INTRX2). 000: Disable Interrupt 001 to 111: 1 to 7 If DM12 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM131
29
28
DM13 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 19 to be the activation factor.
27
R 0 Always reads "0."
26
IL132
25
IL131 R/W 0
24
IL130
EIM130 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM13 = 0, select the interrupt level for interrupt number 19 (INTTX2) 000: Disable Interrupt 001 to 111: 1 to 7 If DM13 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use. TMP19A64(rev1.1) 6-18
TMP19A64C1D
7
IMC5 bit Symbol (0xFFFF_E014) Read/Write After reset Function R 0 Always reads "0."
6
EIM141
5
4
DM14 0 Set as DMAC activation factor.
3
2
IL142
1
IL141 R/W 0
0
IL140
EIM140 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
R 0 0 0 Always If DM14 = 0, reads "0." select the interrupt level for interrupt number 20 (INTSB1). 000: Disable Interrupt 0: Non001 to 111: 1 to 7 activation If DM14 = 1, factor select the DMAC channel. 1: Interrupt number 20 000 to 011: 0 to 3 is set as 100 to 111: 4 to 7
the activation factor
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM151
13
12
DM15 0 Set as DMAC activation factor.
11
10
IL152
9
IL151 R/W 0
8
IL150
EIM150 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
R 0 0 0 Always If DM15 = 0, reads "0." select the interrupt level for interrupt number 21 (INTADHP) 000: Disable Interrupt 0: Non001 to 111: 1 to 7 activation If DM15 = 1, factor select the DMAC channel. 1: Interrupt number 21 000 to 011: 0 to 3 to be the 100 to 111: 4 to 7
activation factor.
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM161
21
20
DM16 0 Set as DMAC activation factor.
19
18
IL162
17
IL161 R/W 0
16
IL160
EIM160 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
R 0 0 0 Always If DM16 = 0, reads "0." select the interrupt level for interrupt number 22 (INTADM). 000: Disable Interrupt 0: Non001 to 111: 1 to 7 activation If DM16 = 1, factor select the DMAC channel. 1: Interrupt number 22 000 to 011: 0 to 3 to be the 100 to 111: 4 to 7
activation factor.
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM171
29
28
DM17 0 Set as DMAC activation factor.
27
26
IL172
25
IL171 R/W 0
24
IL170
EIM170 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
R 0 0 0 Always If DM17 = 0, reads "0." select the interrupt level for interrupt number 23 (INTTB0). 000: Disable Interrupt 0: Non001 to 111: 1 to 7 activation If DM17 = 1, factor select the DMAC channel. 1: Interrupt number 23 000 to 011: 0 to 3 to be the 100 to 111: 4 to 7
activation factor.
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-19
TMP19A64C1D
7
IMC6 bit Symbol (0xFFFF_E018) Read/Write After reset Function R 0 Always reads "0."
6
EIM181
5
4
DM18 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 24 is set as the activation factor
3
R 0 Always reads "0."
2
IL182
1
IL181 R/W 0
0
IL180
EIM180 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM18 = 0, select the interrupt level for interrupt number 24 (INTTB1). 000: Disable Interrupt 001 to 111: 1 to 7 If DM18 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM191
13
12
DM19 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 25 to be the activation factor.
11
R 0 Always reads "0."
10
IL192
9
IL191 R/W 0
8
IL190
EIM190 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM19 = 0, select the interrupt level for interrupt number 25 (INTTB2). 000: Disable Interrupt 001 to 111: 1 to 7 If DM19 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM1A1
21
20
DM1A 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 26 to be the activation factor.
19
R 0 Always reads "0."
18
IL1A2
17
IL1A1 R/W 0
16
IL1A0
EIM1A0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM1A = 0, select the interrupt level for interrupt number 26 (INTTB3). 000: Disable Interrupt 001 to 111: 1 to 7 If DM1A = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM1B1
29
28
DM1B 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 27 to be the activation factor.
27
R 0 Always reads "0."
26
IL1B2
25
IL1B1 R/W 0
24
IL1B0
EIM1B0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM1B = 0, select the interrupt level for interrupt number 27 (INTTB4). 000: Disable Interrupt 001 to 111: 1 to 7 If DM1B = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use. TMP19A64(rev1.1) 6-20
TMP19A64C1D
7
IMC7 bit Symbol (0xFFFF_E01C) Read/Write After reset Function R 0 Always reads "0."
6
EIM1C1
5
4
DM1C 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 28 to be the activation factor.
3
R 0 Always reads "0."
2
IL1C2
1
IL1C1 R/W 0
0
IL1C0
EIM1C0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM1C = 0, select the interrupt level for interrupt number 28 (INTCAPG). 000: Disable Interrupt 001 to 111: 1 to 7 If DM1C = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM1D1
13
12
DM1D 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 29 to be the activation factor.
11
R 0 Always reads "0."
10
IL1D2
9
IL1D1 R/W 0
8
IL1D0
EIM1D0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM1D = 0, select the interrupt level for interrupt number 29 (INTCOMP0). 000: Disable Interrupt 001 to 111: 1 to 7 If DM1D = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM1E1
21
20
DM1E 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 30 to be the activation factor.
19
R 0 Always reads "0."
18
IL1E2
17
IL1E1 R/W 0
16
IL1E0
EIM1E0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM1E = 0, select the interrupt level for interrupt number 30 (INTCMP1). 000: Disable Interrupt 001 to 111: 1 to 7 If DM1E = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM1F1
29
28
DM1F 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 31 to be the activation factor.
27
R 0 Always reads "0."
26
IL1F2
25
IL1F1 R/W 0
24
IL1F0
EIM1F0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM1F = 0, select the interrupt level for interrupt number 31 (INTCMP2) 000: Disable Interrupt 001 to 111: 1 to 7 If DM1F = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-21
TMP19A64C1D
7
IMC8 (0xFFFF_E020) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
EIM201
5
4
DM20 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 32 to be the activation factor.
3
R 0 Always reads "0."
2
IL202
1
IL201 R/W 0
0
IL200
EIM200 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM20 = 0, select the interrupt level for interrupt number 32 (INTCMP3) 000: Disable Interrupt 001 to 111: 1 to 7 If DM20 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM211
13
12
DM21 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 33 to be the activation factor.
11
R 0 Always reads "0."
10
IL212
9
IL211 R/W 0
8
IL210
EIM210 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM21 = 0, select the interrupt level for interrupt number 33 (INTCMP4). 000: Disable Interrupt 001 to 111: 1 to 7 If DM21 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM221
21
20
DM26
19
18
IL222
17
16
IL220 0
EIM220 R/W 0 0 Be sure to set "00."
R 0 0 Be sure to Always set "0." reads "0."
IL221 R/W 0 0 Be sure to set "00."
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM231
29
28
27
R 0 Always reads "0."
26
IL232
25
IL231 R/W 0
24
IL230
EIM230 DM23 R/W 0 0 0 Selects active state of Set as interrupt request. DMAC activation factor. 11: Rising edge Be sure to set "11." 0: Non-
activation factor 1: Interrupt number 35 to be the activation factor.
0 0 If DM23 = 0, select the interrupt level for interrupt number 35 (INTRX3) 000: Disable Interrupt 001 to 111: 1 to 7 If DM23 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-22
TMP19A64C1D
7
IMC9 (0xFFFF_E024) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
EIM241
5
4
DM24 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 36 to be the activation factor.
3
R 0 Always reads "0."
2
IL242
1
IL241 R/W 0
0
IL240
EIM240 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM24 = 0, select the interrupt level for interrupt number 36 (INTTX3). 000: Disable Interrupt 001 to 111: 1 to 7 If DM24 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM251
13
12
DM25 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 37 to be the activation factor.
11
R 0 Always reads "0."
10
IL252
9
IL251 R/W 0
8
IL250
EIM250 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM25 = 0, select the interrupt level for interrupt number 37 INTRX4). 000: Disable Interrupt 001 to 111: 1 to 7 If DM25 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM261
21
20
DM26 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 38 to be the activation factor.
19
R 0 Always reads "0."
18
IL262
17
IL261 R/W 0
16
IL260
EIM260 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM26 = 0, select the interrupt level for interrupt number 38 (INTTX4). 000: Disable Interrupt 001 to 111: 1 to 7 If DM26 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM271
29
28
DM27 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 39 to be the activation factor.
27
R 0 Always reads "0."
26
IL272
25
IL271 R/W 0
24
IL270
EIM270 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM27 = 0, select the interrupt level for interrupt number 39 (INTRX5). 000: Disable Interrupt 001 to 111: 1 to 7 If DM27 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-23
TMP19A64C1D
7
IMCA bit Symbol (0xFFFF_E028) Read/Write After reset Function R 0 Always reads "0."
6
EIM281
5
4
DM28 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 40 to be the activation factor.
3
R 0 Always reads "0."
2
IL282
1
IL281 R/W 0
0
IL280
EIM280 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM28 = 0, select the interrupt level for interrupt number 40 (INTTX5). 000: Disable Interrupt 001 to 111: 1 to 7 If DM28 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM291
13
12
DM29 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 41 to be the activation factor.
11
R 0 Always reads "0."
10
IL292
9
IL291 R/W 0
8
IL290
EIM290 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM29 = 0, select the interrupt level for interrupt number 41 (INTRX6). 000: Disable Interrupt 001 to 111: 1 to 7 If DM29 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM2A1
21
20
DM2A 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 42 to be the activation factor.
19
R 0 Always reads "0."
18
IL2A2
17
IL2A1 R/W 0
16
IL2A0
EIM2A0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM2A = 0, select the interrupt level for interrupt number 42 (INTTX6). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2A = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM2B1
29
28
DM2B 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 43 to be the activation factor.
27
R 0 Always reads "0."
26
IL2B2
25
IL2B1 R/W 0
24
IL2B0
EIM2B0 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM2B = 0, select the interrupt level for interrupt number 43 (INTTB5). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2B = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-24
TMP19A64C1D
7
IMCB bit Symbol (0xFFFF_E02C) Read/Write After reset Function
6
EIM2C1
5
4
DM2C 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 44 to be the activation factor.
3
R 0 Always reads "0."
2
IL2C2
1
IL2C1 R/W 0
0
IL2C0
EIM2C0 R R/W 0 0 0 Always Selects active state of reads "0." interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM2C = 0, select the interrupt level for interrupt number 44 (INTTB6). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2C = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function
14
EIM2D1
13
12
DM2D 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 45 to be the activation factor.
11
R 0 Always reads "0."
10
IL2D2
9
IL2D1 R/W 0
8
IL2D0
EIM2D0 R R/W 0 0 0 Always Selects active state of reads "0." interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM2D = 0, select the interrupt level for interrupt number 45 (INTTB7). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2D = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function
22
EIM2E1
21
20
DM2E 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 46 to be the activation factor.
19
R 0 Always reads "0."
18
IL2E2
17
IL2E1 R/W 0
16
IL2E0
EIM2E0 R R/W 0 0 0 Always Selects active state of reads "0." interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM2E = 0, select the interrupt level for interrupt number 46 (INTTB8). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2E = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function
30
EIM2F1
29
28
DM2F 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 47 to be the activation factor.
27
R 0 Always reads "0."
26
IL2F2
25
IL2F1 R/W 0
24
IL2F0
EIM2F0 R R/W 0 0 0 Always Selects active state of reads "0." interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM2F = 0, select the interrupt level for interrupt number 47 (INTTB9). 000: Disable Interrupt 001 to 111: 1 to 7 If DM2F = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-25
TMP19A64C1D
7
IMCC (0xFFFF_E030) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
EIM301
5
4
DM30 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 48 to be the activation factor.
3
R 0 Always reads "0."
2
IL302
1
IL301 R/W 0
0
IL300
EIM300 R/W 0 0 Selects active state of interrupt request. 01: "H" level Be sure to set "01."
0 0 If DM30 = 0, select the interrupt level for interrupt number 48 (INTTBA). 000: Disable Interrupt 001 to 111: 1 to 7 If DM30 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM311
13
12
DM31 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 49 to be the activation factor.
11
R 0 Always reads "0."
10
IL312
9
IL311 R/W 0
8
IL310
EIM310 R/W 0 0 Selects active state of interrupt request. 1: Rising edge Be sure to set "11."
0 0 If DM31 = 0, select the interrupt level for interrupt number 49 (INTCMP5) 000: Disable Interrupt 001 to 111: 1 to 7 If DM31 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM321
21
20
DM32 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 50 to be the activation factor.
19
R 0 Always reads "0."
18
IL322
17
IL321 R/W 0
16
IL320
EIM320 R/W 0 0 Selects active state of interrupt request. 1: Rising edge Be sure to set "11."
0 0 If DM32 = 0, select the interrupt level for interrupt number 50 (INTCMP6) 000: Disable Interrupt 001 to 111: 1 to 7 If DM32 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM331
29
28
DM33 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 51 to be the activation factor.
27
R 0 Always reads "0."
26
IL332
25
IL331 R/W 0
24
IL330
EIM330 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM33 = 0, select the interrupt level for interrupt number 51 (INTCMP7) 000: Disable Interrupt 001 to 111: 1 to 7 If DM33 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use.
TMP19A64(rev1.1) 6-26
TMP19A64C1D
7
IMCD bit Symbol (0xFFFF_E034) Read/Write After reset Function R 0 Always reads "0."
6
EIM341
5
4
DM34 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 52 to be the activation factor.
3
R 0 Always reads "0."
2
IL342
1
IL341 R/W 0
0
IL340
EIM340 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM34 = 0, select the interrupt level for interrupt number 52 (INTCMP8) 000: Disable Interrupt 001 to 111: 1 to 7 If DM34 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM351
13
12
DM35 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 53 to be the activation factor.
11
R 0 Always reads "0."
10
IL352
9
IL351 R/W 0
8
IL350
EIM350 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM35 = 0, select the interrupt level for interrupt number 53 (INTCMP9) 000: Disable Interrupt 001 to 111: 1 to 7 If DM35 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM361
21
20
DM36 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 54 to be the activation factor.
19
R 0 Always reads "0."
18
IL362
17
IL361 R/W 0
16
IL360
EIM360 R/W 0 0 Selects active state of interrupt request. 01: "H" level Be sure to set "01."
0 0 If DM36 = 0, select the interrupt level for interrupt number 54 (INTRTC) 000: Disable Interrupt 001 to 111: 1 to 7 If DM36 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM371
29
28
DM37 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 55 to be the activation factor.
27
R 0 Always reads "0."
26
IL372
25
IL371 R/W 0
24
IL370
EIM370 R/W 0 0 Selects active state of interrupt request. 11: Rising edge Be sure to set "11."
0 0 If DM37 = 0, select the interrupt level for interrupt number 55 (INTAD) 000: Disable Interrupt 001 to 111: 1 to 7 If DM37 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use. TMP19A64(rev1.1) 6-27
TMP19A64C1D
7
IMCE bit Symbol (0xFFFF_E038) Read/Write After reset Function R 0 Always reads "0."
6
EIM381
5
4
DM38 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 56 to be the activation factor.
3
R 0 Always reads "0."
2
IL382
1
IL381 R/W 0
0
IL380
EIM380 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
0 0 If DM38 = 0, select the interrupt level for interrupt number 56 (INTDMA0) 000: Disable Interrupt 001 to 111: 1 to 7 If DM38 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM391
13
12
DM39 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 57 to be the activation factor.
11
R 0 Always reads "0."
10
IL392
9
IL391 R/W 0
8
IL390
EIM390 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
0 0 If DM39 = 0, select the interrupt level for interrupt number 57 (INTDM1) 000: Disable Interrupt 001 to 111: 1 to 7 If DM39 = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM3A1
21
20
DM3A 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 58 to be the activation factor.
19
R 0 Always reads "0."
18
IL3A2
17
IL3A1 R/W 0
16
IL3A0
EIM3A0 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
0 0 If DM3A = 0, select the interrupt level for interrupt number 58 (INTDMA2) 000: Disable Interrupt 001 to 111: 1 to 7 If DM3A = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM3B1
29
28
DM3B 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 59 to be the activation factor.
27
R 0 Always reads "0."
26
IL3B2
25
IL3B1 R/W 0
24
IL3B0
EIM3B0 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
0 0 If DM3B = 0, select the interrupt level for interrupt number 59 (INTDMA3). 000: Disable Interrupt 001 to 111: 1 to 7 If DM3B = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use. TMP19A64(rev1.1) 6-28
TMP19A64C1D
7
IMCF bit Symbol (0xFFFF_E03C) Read/Write After reset Function R 0 Always reads "0."
6
EIM3C1
5
4
DM3C 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 60 to be the activation factor.
3
2
IL3C2
1
IL3C1 R/W 0
0
IL3C0
EIM3C0 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
R 0 0 0 Always If DM3C = 0, reads "0." select the interrupt level for interrupt number 60 (INTDMA4) 000: Disable Interrupt 001 to 111: 1 to 7 If DM3C = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
EIM3D1
13
12
DM3D 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 61 to be the activation factor.
11
10
IL3D2
9
IL3D1 R/W 0
8
IL3D0
EIM3D0 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
R 0 0 0 Always If DM3D = 0, reads "0." select the interrupt level for interrupt number 61 (INTDMA5) 000: Disable Interrupt 001 to 111: 1 to 7 If DM3D = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
EIM3E1
21
20
DM3E 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 62 to be the activation factor.
19
18
IL3E2
17
IL3E1 R/W 0
16
IL3E0
EIM3E0 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
R 0 0 0 Always If DM3E = 0, reads "0." select the interrupt level for interrupt number 62 (INTDMA6). 000: Disable Interrupt 001 to 111: 1 to 7 If DM3E = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
EIM3F1
29
28
DM3F 0 Set as DMAC activation factor.
0: Nonactivation factor 1: Interrupt number 63 to be the activation factor.
27
26
IL3F2
25
IL3F1 R/W 0
24
IL3F0
EIM3F0 R/W 0 0 Selects active state of interrupt request. 10: Falling edge Be sure to set "10."
R 0 0 0 Always If DM3F = 0, reads "0." select the interrupt level for interrupt number 63 (INTDMA7). 000: Disable Interrupt 001 to 111: 1 to 7 If DM3F = 1, select the DMAC channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
Note:
Default values of EIMxx0 and EIMxx1 are different from the values to be used. Properly set them to the specified values before use. TMP19A64(rev1.1) 6-29
TMP19A64C1D
Note 1: Please ensure that the type of active state is selected before enabling an interrupt request. Note 2: When making interrupt requests DMAC activation factors, please ensure that you put the DMAC into standby mode after setting the INTC.
6.5.5
Interrupt Request Clear Register
This register is used to clear interrupt requests. Interrupt requests are cleared by setting the IVR value. 7 6
EICLR6
5
EICLR5
4
EICLR4
3
2
1
0
INTCLR (0xFFFF_E060)
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
EICLR3 EICLR2 EICLR1 EICLR0 R/W 0 0 0 0 0 0 0 0 Set the IVR value that corresponds to the interrupt request that you would like to clear.
EICLR7
15
14
13
12
R 0 Always reads "0."
11
10
9
8
EICLR8 R/W 0
23
bit Symbol Read/Write After reset Function
22
21
20
19
18
17
16
R 0 Always reads "0."
31
bit Symbol Read/Write After reset Function
30
29
28
27
26
25
24
R 0 Always reads "0."
(Note 1) Do not clear interrupt requests before reading the IVR value. If an interrupt request is cleared, IVR is cleared to "0." (Note 2) To make the interrupt controller (INTC) disable specified interrupt requests, perform the following steps in the order shown: Disable the processor core to accept interrupts (Status = 0). Disable the INTC to accept interrupts (IMCxx = 000). Execute the SYNC instruction. Enable the processor core to accept interrupts (Status = 1). Example) mtc0 r0, r31 ; _DI ( ); sb r0, IMC** ; IMC**=0; sync ; _SYNC( ); mtc0 $sp, r31 ; _EI ( ); (Note 3) Any internal DMA request initiated by an interrupt factor will not be cleared. When the request is to be canceled, clear the activation factor bit of (IMCx) .
TMP19A64(rev1.1) 6-30
TMP19A64C1D
6.5.6
INTCG Registers (Interrupts to clear Stop, Sleep and Idle modes)
INT0 to INTB, KWUP0 to KWUP7: STOP/SLEEP/IDLE INTRTC, INTTBA (Two-phase pulse input counter): Sleep 7 6
R 0 Always reads "0." 0 Always reads "0."
5
4
3
0 Always reads "0."
2
R 0 Always reads "0."
1
0 Always reads "0."
0
INT0EN R/W 0 INT0
Clear input
IMCGA (0xFFFF_EE10)
bit Symbol Read/Write After reset Function
EMCG01 EMCG00 R/W 1 0 Set active state of INT0 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
0 Always reads "0."
13
12
11
0 Always reads "0."
10
R 0 Always reads "0."
9
0 Always reads "0."
8
INT1EN R/W 0 INT1
Clear input
EMCG11 EMCG10 R/W 1 0 Set active state of INT1 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
0 Always reads "0."
21
20
19
0 Always reads "0."
18
R 0 Always reads "0."
17
0 Always reads "0."
16
INT2EN R/W 0 INT2
Clear input
EMCG21 EMCG20 R/W 1 0 Set active state of INT2 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
0 Always reads "0."
29
28
27
0 Always reads "0."
26
R 0 Always reads "0."
25
0 Always reads "0."
24
INT3EN R/W 0 INT3
Clear input
EMCG31 EMCG30 R/W 1 0 Set active state of INT3 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
TMP19A64(rev1.1) 6-31
TMP19A64C1D
7
IMCGB (0xFFFF_EE14) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
0 Always reads "0."
5
4
3
0 Always reads "0."
2
R 0 Always reads "0."
1
0 Always reads "0."
0
INT4EN R/W 0 INT4
Clear input
EMCG41 EMCG40 R/W 1 0 Set active state of INT4 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
0 Always reads "0."
13
12
11
0 Always reads "0."
10
R 0 Always reads "0."
9
0 Always reads "0."
8
INT5EN R/W 0 INT5
Clear input
EMCG51 EMCG50 R/W 1 0 Set active state of INT5 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
0 Always reads "0."
21
20
19
0 Always reads "0."
18
R 0 Always reads "0."
17
0 Always reads "0."
16
INT6EN R/W 0 INT6
Clear input
EMCG61 EMCG60 R/W 1 0 Set active state of INT6 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
0 Always reads "0."
29
28
27
0 Always reads "0."
26
R 0 Always reads "0."
25
0 Always reads "0."
24
INT7EN R/W 0 INT7
Clear input
EMCG71 EMCG70 R/W 1 0 Set active state of INT7 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
TMP19A64(rev1.1) 6-32
TMP19A64C1D
7
IMCGC (0xFFFF_EE18) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
0 Always reads "0."
5
4
3
0 Always reads "0."
2
R 0 Always reads "0."
1
0 Always reads "0."
0
INT8EN R/W 0 INT8
Clear input
EMCG81 EMCG80 R/W 1 0 Set active state of INT8 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
0 Always reads "0."
13
12
11
0 Always reads "0."
10
R 0 Always reads "0."
9
0 Always reads "0."
8
INT9EN R/W 0 INT9
Clear input
EMCG91 EMCG90 R/W 1 0 Set active state of INT9 standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
0 Always reads "0."
21
20
19
0 Always reads "0."
18
R 0 Always reads "0."
17
0 Always reads "0."
16
INTAEN R/W 0 INTA
Clear input
EMCGA1 EMCGA0 R/W 1 0 Set active state of INTA standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
0 Always reads "0."
29
28
27
0 Always reads "0."
26
R 0 Always reads "0."
25
0 Always reads "0."
24
INTBEN R/W 0 INTB
Clear input
EMCGB1 EMCGB0 R/W 1 0 Set active state of INTB standby clear request. 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0: Disable 1: Enable
TMP19A64(rev1.1) 6-33
TMP19A64C1D
7
IMCGD (0xFFFF_EE1C) bit Symbol Read/Write After reset Function R 0 Always reads "0."
6
0 Always reads "0."
5
4
3
0 Always reads "0."
2
R 0 Always reads "0."
1
0 Always reads "0."
0
KWUPEN R/W 0 KWUP Clear input 0: Disable 1: Enable
EMCGC1 EMCGC0 R/W 1 0 Set active state of KWUP standby clear request. 01: "H" level Be sure to set "01."
15
bit Symbol Read/Write After reset Function R 0 Always reads "0."
14
0 Always reads "0."
13
12
11
0 Always reads "0."
10
R 0 Always reads "0."
9
0 Always reads "0."
8
INTRTCEN R/W 0 INTRTC Clear input 0: Disable 1: Enable
EMCGD1 EMCGD0 R/W 1 0 Set active state of INTRTC standby clear request. 11: Rising edge Be sure to set "11."
23
bit Symbol Read/Write After reset Function R 0 Always reads "0."
22
0 Always reads "0."
21
20
19
18
R 0 Always reads "0."
17
16
INTTBAEN R/W 0 INTTBA Clear input 0: Disable 1: Enable
EMCGE1 EMCGE0 R/W 1 0 Set active state of INTTBA standby clear request. 11: Rising edge Be sure to set "11."
Always reads "0."
Always reads "0."
31
bit Symbol Read/Write After reset Function R 0 Always reads "0."
30
0 Always reads "0."
29
R/W 1 Undefined
28
0
27
26
R 0 Always reads "0."
25
24
R/W 0 Write "1."
Always reads "0."
Always reads "0."
Note:
In IMCGD, the initial value to request clearing of the Standby mode is different from the setting to be made in an operation condition. Be sure to set appropriate parameters before it is used to clear the Standby mode.
TMP19A64(rev1.1) 6-34
TMP19A64C1D
Be sure to set active state of the clear request if interrupt is enabled for clearing the Stop, Sleep, or Idle standby mode. (Note1) When using interrupts, be sure to follow the following sequence of action: If shared with other general ports, enable the target interrupt input. Set active state, etc., upon initialization. Clear interrupt requests. Enable interrupts (Note 2) Settings must be performed while interrupts are disabled. (Note 3) For clearing the Stop, Sleep and Idle modes with TMP19A64, 15 factors, i.e., INT0 to INTB, INTRTC, INTTBA, and KWUP (KWUP0 to 7) are available as clearing interrupts. Whether or not INT0 to INTB are to be used as clearing interrupts as well as active state edge/level selection is set with CG. Whether or not KWUP0 to 7 are to be used as STOP/SLEEP/IDLE clearing interrupts is set with CG and active state edge/level selection is set with KWUPSTn . Set to High level with INTC for the above 15 factors. Example: Enabling INT0 interrupt IMCGA = "10" IMCGA = "1" IMC0 = "01" IMC0 = "101" CG block (Enable input by the falling edge) INTC block (Set interrupt active level to "H" and the interrupt level to 5.) Interrupt factors other than those assigned as Stop/Sleep/Idle clear requests are set in the INTC block. (Note 4) Among the above 15 factors to be assigned as Stop/Sleep/Idle clear request interrupts, INT0 to INTB don't have to be set with CG if they are to be used as normal interrupts. Use INTC to specify either H/L level or rising/falling edge. If KWUP0 to 7 are to be used as normal interrupts, set the active level by KWUPSTn and set High level with INTC. No CG setting is necessary. Also, if INTRTC is to be used as a normal interrupt, use CG/INTC for the setting. Interrupt factors other than those assigned as Stop/Sleep/Idle clear requests are set in the INTC block.
TMP19A64(rev1.1) 6-35
TMP19A64C1D
EICRCG
(0xFFFF_EE20) bit Symbol Read/Write After reset Function
7
0
6
5
4
0
3
ICRCG3
2
ICRCG2
1
ICRCG1 W/R 0
0
ICRCG0 0
R 0 0 Always reads "0."
0 0 Always reads "0." Clear interrupt requests. 0000: INT0 0101: INT5 0001: INT1 0110: INT6 0010: INT2 0111: INT7 0011: INT3 1000: INT8 0100: INT4 1001: INT9 1111: reserved
1010: INTA 1011: INTB 1100: KWUP 1101: INTRTC 1110: INTTBA
15
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function 0
14
0
13
0
12
11
10
0
9
0
8
0
R 0 0 Always reads "0."
23
0
22
0
21
0
20
19
18
0
17
0
16
0
R 0 0 Always reads "0."
31
0
30
0
29
0
28
27
26
0
25
0
24
0
R 0 0 Always reads "0."
(Note 5) To clear interrupt request of the above 15 factors that are assigned to clear Stop/Sleep/Idle modes, For KWUP, use KWUPST For INT0 to INTB, INTTBA and INTRTC use the EICRCG register in the above CG block and then use the INTCLR register in the INTC block (two locations). For clearing any other interrupt requests, only INTCLR register is to be cleared.
TMP19A64(rev1.1) 6-36
TMP19A64C1D
NMIFLG
(0xFFFF_EE24) bit Symbol Read/Write After reset Function
7
0
6
0
5
0 Always reads "0."
4
R 0
3
0
2
NMI 0 NMI factor 1: NMI generated by NMI pin input
1
WDT 0 NMI factor 1: NMI generated by WDT interrupt
0
WBER 0 NMI factor 1: NMI generated by write bus error
15
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function 0
14
0
13
0
12
11
10
0
9
0
8
0
R 0 0 Always reads "0."
23
0
22
0
21
0
20
19
18
0
17
0
16
0
R 0 0 Always reads "0."
31
0
30
0
29
0
28
27
26
0
25
0
24
0
R 0 0 Always reads "0."
* NMI, WDT and WBER are cleared to "0" when they are read.
TMP19A64(rev1.1) 6-37
TMP19A64C1D
7.
7.1
Input/Output Ports
Port 0 (P00 through P07)
The port 0 is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register P0CR. A reset allows all bits of P0CR to be cleared to "0" and the port 0 to be put in input mode. Besides the general-purpose input/output function, the port 0 performs other functions: D0 through D7 function as a data bus and AD0 through AD7 function as an address data bus. When external memory is accessed, the port 0 automatically functions as either a data bus or an address data bus, and all bits of P0CR are cleared to "0." If the BUSMD pin is set to "L" level during a reset, the port 0 is put in separate bus mode (D0 to D7). If it is set to "H" level during a reset, the port 0 is put in multiplexed mode (AD0 to AD7).
When output externally
During external access
1 0
Selector
Direction control (in units of bits) P0CR D0-D7/ AD0-AD7 Selector Internal data bus 1 Output latch 0 P0
STOP MODE SYSCR2
Output buffer
Port 0 P00 through P07 (D0 through D7) (AD0 through AD7)
S Selector 1 0 EBIF
Reset
Y
P0 read External read
Fig. 7.1.1 Port 0 (P00 through P07)
TMP19A64 (rev1.1) 7-1
TMP19A64C1D
Port 0 register 7
P0 (0xFFFF_F000) Bit Symbol Read/Write After reset P07
6
P06
5
P05
4
P04
3
P03
2
P02
1
P01
0
P00
R/W Input mode (output latch register is cleared to "0.")
Port 0 control register 7
P0CR (0xFFFF_F002) Bit Symbol Read/Write After reset Function P07C 0
6
P06C 0
5
P05C 0
4
P04C R/W 0
3
P03C 0
2
P02C 0
1
P01C 0
0
P00C 0
0: Input 1: Output (When an external area is accessed, D7-0 or AD7-0 is used and this register is cleared to "0.")
Fig. 7.1.2 Port 0 Registers
TMP19A64 (rev1.1) 7-2
TMP19A64C1D
7.2
Port 1 (P10 through P17)
The port 1 is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register P1CR and the function register P1FC. A reset allows all bits of the output latch P1, P1CR and P1FC to be cleared to "0" and the port 1 to be put in input mode. Besides the general-purpose input/output function, the port 1 performs other functions: D8 through D15 function as a data bus, AD8 through AD15 function as an address data bus, and A8 through A15 function as an address bus. To access external memory, the port 1 must be designated as an address bus or address data bus by making proper P1CR and P1FC settings. If the BUSMD pin is set to "L" level during a reset, the port 1 is put in separate bus mode (D8 to D15). If it is set to "H" level during a reset, the port 1 is put in multiplexed mode (AD8 to AD15 or A8 to A15).
When output external
Direction control (in units of bits) P1CR 0
STOP MODE SYSCR2
1 Function control (in units of bits) P1FC
AD8 through D15/ A8 through A15
Selector
Selector
Internal data bus
1 Output latch 0 P1
Port 1 P10 through P17 (D8 through D15) (AD8 through AD15/A8 through A15) Reset
S Selector 1 0 EBIF
Y
P1 read External read
Fig. 7.2.1 Port 1 (P10 through P17)
TMP19A64 (rev1.1) 7-3
TMP19A64C1D
Port 1 register 7
P1 (0xFFFF_F001) Bit Symbol Read/Write After reset P17
6
P16
5
P15
4
P14
3
P13
2
P12
1
P11
0
P10
R/W Input mode (output latch register is cleared to "0.")
Port 1 control register 7
P1CR (0xFFFF_F004) Bit Symbol Read/Write After reset Function P17C 0
6
P16C 0
5
P15C 0
4
P14C
3
P13C
2
P12C 0
1
P11C 0
0
P10C 0
R/W 0 0 << See P1FC >>
Port 1 function register 7
P1FC (0xFFFF_F005) Bit Symbol Read/Write After reset Function P17F 0
6
P16F 0
5
P15F 0
4
P14F R/W 0
3
P13F 0
2
P12F 0
1
P11F 0
0
P10F 0
P1FC/P1CR = 00: Input, 01: Output, 10: D15 through 8 or AD15 through 8, 11: A15 through 8
Function POR1 input setting POR1 output setting Separate bus mode (BUSMD="0") Data bus (D15 through D8) input/output setting Address bus (A15 through A8) output setting Address data bus (AD15 through AD8) input/output setting Address bus (A15 through A8) output setting
Corresponding BIT of P1FC 0 0 1 1 1 1
Corresponding BIT of P1CR 0 1 0
PORT to be used PORT1 PORT1 PORT1
1 0 PORT1 1
Multiplexed bus mode (BUSMD="1")
Fig. 7.2.2 Port 1 Registers
TMP19A64 (rev1.1) 7-4
TMP19A64C1D
7.3
Port 2 (P20 through P27)
The port 2 is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register P2CR and the function register P2FC. A reset allows all bits of the output latch P2 to be set to "1," all bits of P2CR and P2FC to be cleared to "0," and the port 2 to be put in input mode. Besides the general-purpose input/output port function, the port 2 performs another function: A0 through A7 function as one address bus and A16 through A23 function as the other address bus. To access external memory, registers P2CR and P2FC must be provisioned to allow the port 2 to function as an address bus. If the BUSMD pin is set to "L" level during a reset, the port 2 is put in separate mode (A16 to A23). If it is set to "H" level during a reset, the port 2 is put in multiplexed mode (A0 through A7 or A16 through A23).
During external access
Direction control (in units of bits) P2CR
STOP MODE SYSCR2
1 Function control (in units of bits) P2FC
A16 through A23/ A0 through A7
Selector
Selector
0
Internal data bus
Output latch P2
1 0
Port 2 P20 through P27 (A16 through A23) (A0 through A7/A16 through A23) RESET
S Selector 1 0
Y
P2 read
Fig. 7.3.1 Port 2 (P20 through P27)
TMP19A64 (rev1.1) 7-5
TMP19A64C1D
Port 2 register 7
P2 (0xFFFF_F012) Bit Symbol Read/Write After reset P27
6
P26
5
P25
4
P24
3
P23
2
P22
1
P21
0
P20
R/W Input mode (output latch register is cleared to "1.")
Port 2 control register 7
P2CR (0xFFFF_F014) Bit Symbol Read/Write After reset Function P27C 0
6
P26C 0
5
P25C 0
4
P24C
3
P23C
2
P22C 0
1
P21C 0
0
P20C 0
R/W 0 0 <>
Port 2 function register 7
P2FC (0xFFFF_F015) Bit Symbol Read/Write After reset Function P27F 0
6
P26F 0
5
P25F 0
4
P24F R/W 0
3
P23F 0
2
P22F 0
1
P21F 0
0
P20F 0
P2FC/P2CR = 00: Input, 01: Output, 10: A7 through 0, 11: A23 through 16
Function POR2 input setting POR2 output setting Address bus (A7 through A0) output setting (*1) Address bus (A23 through A16) output setting (*1)
Corresponding BIT of P2FC 0 0 1 1
Corresponding BIT of P2CR 0 1 0 1
PORT to be used PORT2 PORT2 PORT2 PORT2
(*1)
The same address bus (A7 through A0/A23 through A16) output settings are used in both the separate bus mode and the multiplexed bus mode (BUSMD="0," "1"). Fig. 7.3.2 Port 2 Registers
TMP19A64 (rev1.1) 7-6
TMP19A64C1D
7.4
Port 3 (P30 through P37)
The port 3 is a general-purpose, 8-bit input/output port (P30 and P31 are used exclusively for output). For this port, inputs and outputs can be specified in units of bits by using the control register P3CR and the function register P3FC. A reset allows the output latches P30 and 31 to be set to "1." If the BUSMD pin is at the "L" level when a reset is performed, P37 goes into separate bus mode, and the output latch is set to "1." If the BUSMD pin is at the "H" level when a reset is performed, P37 goes into multiplexed bus mode, and the output latch is cleared to "0." Bit 2 through bit 6 of P3CR (bits 0 and 1 are unused) are cleared to "0." Bit 7 of P3CR is cleared to "0" in separate bus mode and set to "1" in multiplexed bus mode. All bits of P3FC are cleared to "0," P30 and P31 generate "H," and P32 through P36 go into the input mode with a pull-up resistor after RESET is cleared. If the port 3 goes into separate bus mode, P37 is put into input mode. If the port 3 goes into multiplexed bus mode, P37 is put into output mode. Besides the general-purpose input/output port function, the port 3 inputs and outputs CPU control/status signals. If the P30 pin is set to RD signal output mode (="1"), the RD strobe is output only when an external address area is accessed. Likewise, if the P31 pin is set to WR signal output mode (="1"), the WR strobe is output only when an external address area is accessed. As for P32 and P36, when ="1," and BUSAK ="0," Pull-up is enabled.
During external access STOP MODE SYSCR2
Function control (in units of bits) P3FC S 0
Internal data bus Selector
1 Output latch P3 0 1 P3 write S
Selector
P30 ( RD ) P31 ( WR )
RD , WR
P3 read
Fig. 7.4.1 Port 3 (P30, P31)
TMP19A64 (rev1.1) 7-7
TMP19A64C1D
During external access Direction control (in units of bits) P3CR STOP MODE SYSCR2
0
1 Function control (in units of bits) P3FC
Internal data bus
Selector
Programmable pull-up
S Output latch P3 0
Selector
P32 ( HWR )
1
HWR
1
Selector
0
P3 read
Fig. 7.4.2 Port 3 (P32)
TMP19A64 (rev1.1) 7-8
TMP19A64C1D
Direction control (in units of bits) P3CR
STOP MODE SYSCR2
Reset
Function control (in units of bits) P3FC
Internal data bus
Programmable pull-up
Output latch P3 Output buffer
P33 (WAIT / RDY)
Selector
WAIT RDY
0
1
Selector
1
0
P3 read
Fig. 7.4.3 Port 3 (P33)
TMP19A64 (rev1.1) 7-9
TMP19A64C1D
STOP MODE SYSCR2 Direction control (in units of bits) P3CR
Function control (in units of bits) P3FC
Internal data bus
Reset
Programmable pull-up
Output latch P3
P34 (BUSRQ)
BUSRQ S
Selector
1
Y
0
P3 read
Fig. 7.4.4 Port 3 (P34)
TMP19A64 (rev1.1) 7-10
TMP19A64C1D
STOP MODE SYSCR2 Direction control (in units of bits) P3CR
Selector
0
1 Function control (in units of bits) P3FC
Internal data bus
Programmable pull-up
Output latch P3 1 BUSAK
Selector
0
P35 (BUSAK)
Selector
1
0
P3 read
Fig. 7.4.5 Port 3 (P35)
TMP19A64 (rev1.1) 7-11
TMP19A64C1D
During external access
STOP MODE SYSCR2 Direction control (in units of bits) P3CR
Selector
0
1 Function control (in units of bits) P3FC
Internal data bus
Programmable pull-up
Output latch P3
Selector
0
P36 (R/W)
1 R/W
Selector
1
0
P3 read
Fig. 7.4.6 Port 3 (P36)
TMP19A64 (rev1.1) 7-12
TMP19A64C1D
STOP MODE SYSCR2 Direction control (in units of bits) P3CR
Selector
0
Reset
1 Function control (in units of bits) P3FC
Internal data bus
Output latch P3
Selector
0
P37 (ALE)
1 ALE
Selector
1
0
P3 read
Fig. 7.4.7 Port 3 (P37)
TMP19A64 (rev1.1) 7-13
TMP19A64C1D
Port 3 register 7
P3 (0xFFFF_F018) Bit Symbol Read/Write After reset P37
To be determined according to the bus mode (*1)
6
P36
5
P35
4
P34
3
P33 R/W Output mode
2
P32
1
P31
0
P30
1
1
1
1
1
1
1
Port 3 control register 7
P3CR (0xFFFF_F01A) Bit Symbol Read/Write After reset Function P37C
To be determined according to the bus mode (*1)
6
P36C 0
5
P35C R/W 0 0: Input
4
P34C 0
3
P33C 0 1: Output
2
P32C 0
1
0
R 0 Output 0
Port 3 function register 7
P3FC (0xFFFF_F01B) Bit Symbol Read/Write After reset Function P37F 0 0: PORT 1: ALE
6
P36F 0 0: PORT 1: R/W
5
P35F 0 0: PORT 1: BUSAK
4
P34F R/W 0 0: PORT 1: BUSRQ
3
P33F 0 0: PORT/ WAIT 1: PORT/ RDY
2
P32F 0 0: PORT 1: HWR
1
P31F 0 0: PORT 1: WR
0
P30F 0 0: PORT 1: RD
Function RD output setting WR output setting HWR output setting WAIT input setting RDY input setting BUSRQ input setting BUSAK output setting R/W output setting ALE output setting (BUSMD = "1")
Corresponding BIT of P3FC 1(*2) 1(*2) 1 0 1 1 1 1 1(*1)
Corresponding BIT of P3CR - - 1 0 0 0 1 1 1
PORT to be used P30 P31 P32 P33 P34 P35 P36 P37
(*1)
In separate bus mode (BUSMD="0"), ALE is not output. The port 3 functions as an input/output port based on the bit setting of the control register P3CR. After a reset, the port becomes an input port. If a reset is executed in multiplexed bus mode (BUSMD="1"), the port 3 becomes an output port at "L" level. /RD and /WR are output only when an external area is being accessed. Fig. 7.4.6 Port 3 Registers
(*2)
TMP19A64 (rev1.1) 7-14
TMP19A64C1D
7.5
Port 4 (P40 through P47)
The port 4 is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register P4CR and the function register P4FC. A reset allows all bits of the output latch P4 to be set to "1" and all bits of P4CR to be reset to "0." Bits of P40FC through P46FC are reset to "0." P40 through P45 goes into the input mode with a pull-up resistor, and P46 and P47 are put into input mode. Besides the general-purpose input/output port function, the ports 40 through 45 outputs chip select signals ( CS0 through CS5 ), and the port 46 functions as a SCOUT output pin for outputting external clocks.
During external access
STOP MODE SYSCR2 Direction control (in units of bits) P4CR 1
Selector
0
Reset
Function control (in units of bits) P4FC
Internal data bus
Programmable pull-up
Output latch P4 1
CS0, CS1 CS2, CS3 CS4, CS5
Selector
1
0
P4 read
Fig. 7.5.1 Port 4 (P40 to P45)
TMP19A64 (rev1.1) 7-15
Selector
0
P40 (CS0) P41 (CS1) P42 (CS2) P43 (CS3) P44 (CS4) P45 (CS5)
TMP19A64C1D
Direction control (in units of bits) P4CR STOP MODE SYSCR2 Function control (in units of bits) P4FC
Internal data bus
Output latch P4 0 Selector 1 Reset P46 (SCOUT)
1 Selector P4 read fSYS clock fSYS/2 clock fs clock T0 clock 0
Fig. 7.5.2 Port 4 (P46)
TMP19A64 (rev1.1) 7-16
TMP19A64C1D
STOP MODE SYSCR2 Reset Direction control (in units of bits) P4CR
Output latch
Internal data bus
P4
P47
1 Selector P4 read 0
Fig. 7.5.3 Port 4 (P47)
TMP19A64 (rev1.1) 7-17
TMP19A64C1D
Port 4 register 7
P4 (0xFFFF_F01E) Bit Symbol Read/Write After reset 1 1 1 (Pull-Up) P47
6
P46
5
P45
4
P44
3
P43
2
P42
1
P41
0
P40
R/W Input mode 1 1 (Pull-Up) (Pull-Up)
1 (Pull-Up)
1 (Pull-Up)
1 (Pull-Up)
Port 4 control register 7
P4CR (0xFFFF_F020) Bit Symbol Read/Write After reset P47C 0
6
P46C 0
5
P45C 0
4
P44C
3
P43C
2
P42C 0
1
P41C 0
0
P40C 0
R/W 0 0 0: Input 1: Output
Port 4 function register 7
P4FC (0xFFFF_F021) Bit Symbol Read/Write After reset Function P47F R 0 0: PORT
6
P46F 0
5
P45F 0
4
P44F 0 0: PORT 1: CS4
3
P43F R/W 0 0: PORT 1: CS3
2
P42F 0 0: PORT 1: CS2
1
P41F 0 0: PORT 1: CS1
0
P40F 0 0: PORT 1: CS0
0: PORT 0: PORT 1: SCOUT 1: CS5
Function CS0 output setting CS1 output setting CS2 output setting CS3 output setting CS4 output setting CS5 output setting SCOUT output setting
Corresponding BIT of P4FC
1 1 1 1 1 1 1
Corresponding BIT of P4CR 1 1 1 1 1 1 1
PORT to be used P40 P41 P42 P43 P44 P45 P46
Fig. 7.5.4 Port 4 Registers
TMP19A64 (rev1.1) 7-18
TMP19A64C1D
7.6
Port 5 (P50 through P57)
The port 5 is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register P5CR and the function register P5FC. A reset allows all bits of the output latch P5 to be set to "1," all bits of P5CR and P5FC to be cleared to "0," and the port 5 to be put in input mode. The port 5 also functions as an address bus (A0 through A7). To access external memory, P5CR and P5FC must be provisioned to allow the port 5 to function as an address bus. This address bus function can be used only in separate bus mode. (To put the port 5 in separate bus mode, the BUSMD pin must be set to "L" level during a reset.)
During external access
Direction control (in units of bits) P5CR
Selector
STOP MODE SYSCR2 0
1 Function control (in units of bits) P5FC
Reset
Internal data bus
A0 through A7 Output latch P5
1
Selector
0
Port 5 (P50 to P57/A0 through A7)
Selector
1
0
P5 read
Fig. 7.6.1 Port 5 (P50 to P57)
TMP19A64 (rev1.1) 7-19
TMP19A64C1D
Port 5 register 7
P5 (0xFFFF_F028) Bit Symbol Read/Write After reset P57
6
P56
5
P55
4
P54
3
P53
2
P52
1
P51
0
P50
R/W Input mode (output latch register is set to "1.")
Port 5 control register 7
P5CR (0xFFFF_F02C) Bit Symbol Read/Write After reset Function P57C 0
6
P56C 0
5
P55C 0
4
P54C R/W 0 0: Input
3
P53C 0 1: Output
2
P52C 0
1
P51C 0
0
P50C 0
Port 5 function register 7
P5FC (0xFFFF_F02D) Bit Symbol Read/Write After reset Function P57F 0 0: PORT 1: A7
6
P56F 0 0: PORT 1: A6
5
P55F 0 0: PORT 1: A5
4
P54F R/W 0 0: PORT 1: A4
3
P53F 0 0: PORT 1: A3
2
P52F 0 0: PORT 1: A2
1
P51F 0 0: PORT 1: A1
0
P50F 0 0: PORT 1: A0
Function POR5 input setting POR5 output setting Address bus (A7 to A0) output setting (*1)
Corresponding BIT of P5FC 0 0 1
Corresponding BIT of P5CR 0 1 1
PORT to be used PORT5 PORT5 PORT5
(*1)
The same address bus (A7 through A0) output setting is used in both the separate bus mode and multiplexed bus mode (BUSMD="0," "1"). Fig. 7.6.2 Port 5 Registers
TMP19A64 (rev1.1) 7-20
TMP19A64C1D
7.7
Port 6 (P60 through P67)
The port 6 is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register P6CR and the function register P6FC. A reset allows all bits of the output latch P6 to be set to "1," all bits of P6CR and P6FC to be cleared to "0," and the port 6 to be put in input mode. Besides the input/output port function, the port 6 performs other functions: P60 and P63 output SIO data, P61 and P64 input SIO data, P62 and P65 input and output SIO CLK or input CTS, P61 and P64 input external interrupts, and P66 and P67 output a 16-bit timer. The port 6 also functions as an address bus (A8 through A15). To access external memory, P6CR and P6FC must be provisioned to allow the port 6 to function as an address bus. The address bus function can be used only in separate bus mode. (To put the port 6 in separate bus mode, the BUSMD pin must be set to "L" level during a reset.)
During external access
Direction control (in units of bits) P6CR
Selector
STOP MODE SYSCR2 0
1 Function control (in units of bits) P6FC
Reset
Internal data bus
A8 through A15 Output latch P6
1
Selector
0
Port 6 (P60 to P67/A8 through A15 )
P6 read
Fig. 7.7.1 Port 6 (P60 through P67)
TMP19A64 (rev1.1) 7-21
Selector
1
TMP19A64C1D
Port 6 register 7
P6 (0xFFFF_F029) Bit Symbol Read/Write After reset P67
6
P66
5
P65
4
P64
3
P63
2
P62
1
P61
0
P60
R/W Input mode (output latch register is set to "1.")
Port 6 control register 7
P6CR (0xFFFF_F02E) Bit Symbol Read/Write After reset Function P67C 0
6
P66C 0
5
P65C 0
4
P64C
3
P63C
2
P62C 0
1
P61C 0
0
P60C 0
R/W 0 0 0: Input 1: Output
Port 6 function register 7
P6FC Bit Symbol P67F 0 0: PORT 1: A15 (0xFFFF_F02F) Read/Write After reset Function
6
P66F 0 0: PORT 1: A14
5
P65F 0 0: PORT 1: A13
4
P64F R/W 0 0: PORT 1: A12
3
P63F 0 0: PORT 1: A11
2
P62F 0 0: PORT 1: A10
1
P61F 0 0: PORT 1: A9
0
P60F 0 0: PORT 1: A8
Function POR6 input setting POR6 output setting Address bus (A15 to A8) output setting (*1)
Corresponding BIT of P6F 0 0 1
Corresponding BIT of P6CR 0 1 1
PORT to be used PORT6 PORT6 PORT6
(*1)
The same address bus (A15 through A8) output setting is used in both the separate bus mode and multiplexed bus mode (BUSMD="0," "1"). Fig. 7.7.2 Port 6 Registers
TMP19A64 (rev1.1) 7-22
TMP19A64C1D
7.8
Port 7 (P70 through P77), Port 8 (P80 through P87) and Port 9 (P90 through P97)
The ports 7, 8 and 9 are 8-bit ports and used exclusively for input. They are also used as analog input ports for the A/D converter. Inputs can be specified by using the function register PnFC. A reset allows all bits of PnFC to be cleared to "0" and the ports 7, 8 and 9 to be put in input mode.
Reset Reset Function control (P7FC, P8FC, P9FC) (in units of bits) Port 7 to 9 P70 through P97 (AN0 through AN23)
Internal data bus
Port 7 (P7 through P9) read
A/D converter AD read
Fig. 7.8.1 Port 7 to 9 (P70 through P77, P80 through P87 and P90 through P97)
TMP19A64 (rev1.1) 7-23
TMP19A64C1D
Port 7 register 7
P7 (0xFFFF_F040) Bit Symbol Read/Write After reset P77
6
P76
5
P75
4
P74
3
P73
2
P72
1
P71
0
P70
R Input mode
Port 7 function register 7
P7FC (0xFFFF_F048) Bit Symbol Read/Write After reset Function P77F 0 0: PORT 1: AN7
6
P76F 0 0: PORT 1: AN6
5
P75F 0 0: PORT 1: AN5
4
P74F R/W 0 0: PORT 1: AN4
3
P73F 0 0: PORT 1: AN3
2
P72F 0 0: PORT 1: AN2
1
P71F 0 0: PORT 1: AN1
0
P70F 0 0: PORT 1: AN0
Port 8 register 7
P8 (0xFFFF_F041) Bit Symbol Read/Write After reset P87
6
P86
5
P85
4
P84
3
P83
2
P82
1
P81
0
P80
R Input mode
Port 8 function register 7
P8FC (0xFFFF_F049) Bit Symbol Read/Write After reset Function P87F 0 0: PORT 1: AN15
6
P86F 0 0: PORT 1: AN14
5
P85F 0 0: PORT 1: AN13
4
P84F R/W 0 0: PORT 1: AN12
3
P83F 0 0: PORT 1: AN11
2
P82F 0 0: PORT 1: AN10
1
P81F 0 0: PORT 1: AN9
0
P80F 0 0: PORT 1: AN8
Port 9 register 7
P9 (0xFFFF_F042) Bit Symbol Read/Write After reset P97
6
P96
5
P95
4
P94
3
P93
2
P92
1
P91
0
P90
R Input mode
Port 9 function register 7
P9FC (0xFFFF_F04A) Bit Symbol Read/Write After reset Function P97F 0 0: PORT 1: AN23
6
P96F 0 0: PORT 1: AN22
5
P95F 0 0: PORT 1: AN21
4
P94F R/W 0 0: PORT 1: AN20
3
P93F 0 0: PORT 1: AN19
2
P92F 0 0: PORT 1: AN18
1
P91F 0 0: PORT 1: AN17
0
P90F 0 0: PORT 1: AN16
Function Input setting for the ports 7, 8 and 9 Input setting for AN23 through AN0
Corresponding bits of P7FC, P8FC and P9FC 0 1
Fig. 7.8.2 Registers of the Ports 7, 8 and 9
TMP19A64 (rev1.1) 7-24
TMP19A64C1D
7.9
Port A (PA0 through PA7)
The port A is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PACR. A reset allows PACR to be reset to "0" and the port A to function as an input port. Besides the input/output port function, the port A performs other functions: PA2, PA5, PA6 and PA7 output a 16-bit timer, and PA0, PA1, PA3 and PA4 input a 16-bit timer and external interrupts. These functions are enabled by setting corresponding bits of PAFC to "1." A reset allows PACR and PAFC to be cleared to "0" and the port A to be put in input mode.
Direction control (PACR) (in units of bits)
Internal data bus
Function control (PAFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PA) PA0 (TB0IN0) / INT5 PA1 (TB0IN1) / INT6 PA3 (TB1IN0) / INT7 PA4 (TB1IN1) / INT8 S Selector PA0 (TB0IN0) / INT5 , PA1 (TB0IN1) / INT6 , PA3 (TB1IN0) / INT7 , PA4 (TB1IN1) / INT8 PA read 0 1
Fig. 7.9.1 Port A (PA0, PA1, PA3, PA4)
TMP19A64 (rev1.1) 7-25
TMP19A64C1D
Direction control (PACR) (in units of bits)
Function control (PAFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PA) 0 Selector Timer F/F OUT TB0OUT, TB1OUT TB2OUT, TB3OUT S 1 Selector PA read 0 1 S PA2 (TB0OUT PA5 (TB1OUT) PA6 (TB2OUT) PA7 (TB3OUT)
Fig. 7.9.2 Port A (PA2, PA5, PA6, PA7)
TMP19A64 (rev1.1) 7-26
TMP19A64C1D
Port A register 7
PA (0xFFFF_F043) Bit Symbol Read/Write After reset PA7
6
PA6
5
PA5
4
PA4
3
PA3
2
PA2
1
PA1
0
PA0
R/W Input mode (output latch register is set to "1.")
Port A control register 7
PACR (0xFFFF_F047) Bit Symbol Read/Write After reset Function PA7C 0
6
PA6C 0
5
PA5C 0
4
PA4C
3
PA3C
2
PA2C 0
1
PA1C 0
0
PA0C 0
R/W 0 0 0: Input 1: Output
Port A function register 7
PAFC (0xFFFF_F04B) Bit Symbol Read/Write After reset Function PA7F 0
0: PORT 1: TB3OUT
6
PA6F 0
0: PORT 1: TB2OUT
5
PA5F 0
0: PORT 1: TB1OUT
4
PA4F R/W 0
0: PORT 1: TB1IN1 / INT8
3
PA3F 0
0: PORT 1: TB1IN0 / INT7
2
PA2F 0
0: PORT 1: TB0OUT
1
PA1F 0
0: PORT 1: TB0IN1 / INT6
0
PA0F 0
0: PORT 1: TB0IN0 / INT5
Function TB0IN0 input setting INT5 input setting TB0IN1 input setting INT6 input setting TB0OUT output setting TB1IN0 input setting INT7 input setting TB1IN1 input setting INT8 input setting TB1OUT output setting TB2OUT output setting TB3OUT output setting
Corresponding BIT of PAFC 1 1(*1) 1 1(*1) 1 1 1(*1) 1 1(*1) 1 1 1
Corresponding BIT of PACR 0 0 0 0 1 0 0 0 0 1 1 1
PORT to be used PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7
(*1) This bit setting is used only if an interrupt must be generated to clear the STOP status and if SYSCR is set to 0. In all other cases, this bit setting does not need to be used. (Note) If two input functions in addition to the PORT function are assigned to one pin, which input function to be used shall be designated by making proper enable/disable settings provided in each function block. Fig. 7.9.3 Port A Registers
TMP19A64 (rev1.1) 7-27
TMP19A64C1D
7.10 Port B (PB0 through PB7)
Port B is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PBCR. A reset allows PBCR to be reset to "0" and the port B to function as an input port. Besides the input/output port function, the port B performs other functions: PB0 through PB5 output a 16-bit timer, and PB6 and PB7 input a 16-bit timer. These functions are enabled by setting corresponding bits of PBFC to "1." A rest allows PBCR and PBFC to be cleared to "0" and the port B to function as an input port.
Direction control (PBCR) (in units of bits)
Function control (PBFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PB) 0 Selector Timer F/F OUT TB4OUT, TB5OUT TB6OUT, TB7OUT TB8OUT, TB9OUT 1 S PB0 (TB4OUT) PB1 (TB5OUT) PB2 (TB6OUT) PB3 (TB7OUT) PB4 (TB8OUT) PB5 (TB9OUT)
S 1 Selector
PB read
0
Fig. 7.10.1 Port B (PB0 through PB5)
TMP19A64 (rev1.1) 7-28
TMP19A64C1D
Direction control (PBCR) (in units of bits)
Internal data bus
Function control (PBFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PB) PB6 (TBAIN0) PB7 (TBAIN1)
S Selector PB read TBAIN0, TBAIN1
1
0
Fig. 7.10.2 Port B (PB6, PB7)
TMP19A64 (rev1.1) 7-29
TMP19A64C1D
Port B register 7
PB (0xFFFF_F050) Bit Symbol Read/Write After reset PB7
6
PB6
5
PB5
4
PB4
3
PB3
2
PB2
1
PB1
0
PB0
R/W Input mode (output latch register is set to "1.")
Port B control register 7
PBCR (0xFFFF_F054) Bit Symbol Read/Write After reset Function PB7C 0
6
PB6C 0
5
PB5C 0
4
PB4C R/W 0 0: Input
3
PB3C 0 1: Output
2
PB2C 0
1
PB1C 0
0
PB0C 0
Port B function register 7
PBFC (0xFFFF_F058) Bit Symbol Read/Write After reset Function PB7F 0
0: PORT 1: TBAIN1
6
PB6F 0
0: PORT 1: TBAIN0
5
PB5F 0
0: PORT 1: TB9OUT
4
PB4F R/W 0
0: PORT 1: TB8OUT
3
PB3F 0
0: PORT 1: TB7OUT
2
PB2F 0
0: PORT 1: TB6OUT
1
PB1F 0
0: PORT 1: TB5OUT
0
PB0F 0
0: PORT 1: TB4OUT
Function TB4OUT output setting TB5OUT output setting TB6OUT output setting TB7OUT output setting TB8OUT output setting TB9OUT output setting TBAIN0 input setting TBAIN1 input setting
Corresponding BIT of PBFC 1 1 1 1 1 1 1 1
Corresponding BIT of PBCR 1 1 1 1 1 1 0 0
PORT to be used PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7
Fig. 7.10.3 Port B Registers
TMP19A64 (rev1.1) 7-30
TMP19A64C1D
7.11 Port C (PC0 to PC7)
Port C is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PCCR. A reset allows PCCR to be reset to "0" and the port C to function as an input port. Besides the input/output port function, the port C performs other functions: PC0, PC3 and PC6 output SIO data, PC1, PC4 and PC7 input SIO data, and PC2 and PC5 input and output SIO CLK or input CTS. These functions are enabled by setting corresponding bits of PCFC to "1." A reset allows PCCR and PCFC to be cleared to "0" and the port C to function as an input port.
Direction control (PCCR) (in units of bits)
Function control (PCFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PC) 0 S Selector TXD0 output TXD1 output TXD2 output 1 Open drain setting possible S Selector PC read 0 1
PCODE PCODE PCODE
PC0 (TXD0) PC3 (TXD1) PC6 (TXD2)
Fig. 7.11.1 Port C (PC0, PC3, PC6)
TMP19A64 (rev1.1) 7-31
TMP19A64C1D
Direction control (PCCR) (in units of bits)
Internal data bus
Function control (PCFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PC) PC1 (RXD0) PC4 (RXD1) PC7 (RXD2) S Selector RXD0 input RXD1 input RXD2 input PC read 0 1
Fig. 7.11.2 Port C (PC1, PC4, PC7)
TMP19A64 (rev1.1) 7-32
TMP19A64C1D
Direction control (PCCR) (in units of bits)
Function control (PCFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PC) 0 S Selector SCLK0 output SCLK1 output 1 Open drain setting possible
PCODE PCODE
PC2 (SCLK0/CTS0) PC5 (SCLK1/CTS1)
S Selector PC read CTS0, CTS1 SCLK0, SCLK1
1
0
Fig. 7.11.3 Port C (PC2, PC5)
TMP19A64 (rev1.1) 7-33
TMP19A64C1D
Port C register 7
PC (0xFFFF_F051) Bit Symbol Read/Write After reset PC7
6
PC6
5
PC5
4
PC4
3
PC3
2
PC2
1
PC1
0
PC0
R/W Input mode (output latch register is set to "1.")
Port C control register 7
PCCR (0xFFFF_F055) Bit Symbol Read/Write After reset Function PC7C 0
6
PC6C 0
5
PC5C 0
4
PC4C R/W 0 0: Input
3
PC3C 0 1: Output
2
PC2C 0
1
PC1C 0
0
PC0C 0
Port C function register 7
PCFC (0xFFFF_F059) Bit Symbol Read/Write After reset Function PC7F 0
0: PORT 1: RXD2
6
PC6F 0
0: PORT 1: TXD2
5
PC5F 0
0: PORT 1: SCLK1 / CTS1
4
PC4F R/W 0
0: PORT 1: RXD1
3
PC3F 0
0: PORT 1: TXD1
2
PC2F 0
0: PORT 1: SCLK0 / CTS0
1
PC1F 0
0: PORT 1: RXD0
0
PC0F 0
0: PORT 1: TXD0
Port C open drain control register 7
PCODE (0xFFFF_F05D) Bit Symbol Read/Write After reset Function R 0
0: CMOS
6
PC6ODE 0
0: CMOS 1: Open drain
5
PC5ODE 0
0: CMOS 1: Open drain
4
R 0
0: CMOS
3
PC3ODE 0
0: CMOS 1: Open drain
2
PC2ODE 0
0: CMOS 1: Open drain
1
R 0
0: CMOS
0
PC0ODE R/W 0
0: CMOS 1: Open drain
R/W
R/W
Function TXD0 output setting RXD0 input setting SCLK0 output setting SCLK0 input setting CTS0 input setting TXD1 output setting RXD1 output setting SCLK1 output setting SCLK1 input setting CTS1 input setting TXD2 output setting RXD2 input setting
Corresponding BIT of PCFC 1 1 1 1 1 1 1 1 1 1 1 1
Corresponding BIT of PCCR 1 0 1 0 0 1 1 1 0 0 0 0
PORT to be used PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7
Fig. 7.11.4 Port C Registers
TMP19A64 (rev1.1) 7-34
TMP19A64C1D
7.12 Port D (PD0 to PD7)
The port D is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PDCR. A reset allows PDCR to be reset to "0" and the port D to function as an input port. Besides the input/output port function, the port D performs other functions: PD0, PD3 and PD6 input and output SIO CLK or input CTS, PD1 and PD4 output SIO data, PD2 and PD5 input SIO data, and PD7 inputs external interrupts. These functions are enabled by setting corresponding bits of PDFC to "1." A reset allows PDCR and PDFC to be cleared to "0" and the port D to function as an input port.
Direction control (PDCR) (in units of bits)
Function control (PDFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PD) 0 SCLK2 output SCLK3 output SCLK4 output S Selector 1 Open drain setting possible S Selector PD read CTS2, CTS3 CTS4 SCLK2, SCLK3 SCLK4 0 1
PDODE PDODE PDODE
PD0 (SCLK2/CTS2) PD3 (SCLK3/CTS3) PD6 (SCLK4/CTS4)
Fig. 7.12.1 Port D (PD0, PD3, PD6)
TMP19A64 (rev1.1) 7-35
TMP19A64C1D
Direction control (PDCR) (in units of bits)
Function control (PDFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PD) 0 S Selector TXD3 output TXD4 output 1 Open drain setting possible S Selector PD read 0 1
PDODE PDODE
PD1 (TXD3) PD4 (TXD4)
Fig. 7.12.2 Port D (PD1, PD4)
TMP19A64 (rev1.1) 7-36
TMP19A64C1D
Direction control (PDCR) (in units of bits)
Internal data bus
Function control (PDFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PD) PD2 (RXD3) PD5 (RXD4)
S Selector PD read RXD3 input RXD4 input
1
0
Fig. 7.12.3 Port D (PD2, PD5)
TMP19A64 (rev1.1) 7-37
TMP19A64C1D
Direction control (PDCR) (in units of bits) STOP MODE SYSCR2
Function control (PDFC) (in units of bits) Internal data bus
Output latch (PD) PD7 (INT9) Reset S Selector PD read 0 1
INT9
Fig. 7.12.4 Port D (PD7)
TMP19A64 (rev1.1) 7-38
TMP19A64C1D
Port D register 7
PD (0xFFFF_F052) Bit Symbol Read/Write After reset PD7
6
PD6
5
PD5
4
PD4
3
PD3
2
PD2
1
PD1
0
PD0
R/W Input mode (output latch register is set to "1.")
Port D control register 7
PDCR (0xFFFF_F056) Bit Symbol Read/Write After reset Function PD7C 0
6
PD6C 0
5
PD5C 0
4
PD4C R/W 0 0: Input
3
PD3C 0 1: Output
2
PD2C 0
1
PD1C 0
0
PD0C 0
Port D function register 7
PDFC (0xFFFF_F05A) Bit Symbol Read/Write After reset Function PD7F 0
0: PORT 1: INT9
6
PD6F 0
0: PORT 1: SCLK4 / CTS4
5
PD5F 0
0: PORT 1: RXD4
4
PD4F R/W 0
0: PORT 1: TXD4
3
PD3F 0
0: PORT 1: SCLK3 / CTS3
2
PD2F 0
0: PORT 1: RXD3
1
PD1F 0
0: PORT 1: TXD3
0
PD0F 0
0: PORT 1: SCLK2 / CTS2
Port D open drain control register 7
PDODE (0xFFFF_F05E) Bit Symbol Read/Write After reset Function R 0
0: CMOS
6
PD6ODE R/W 0
0: CMOS 1: Open
5
R 0
0: CMOS
4
PD4ODE 0
0: CMOS 1: Open
3
PD3ODE 0
0: CMOS 1: Open
2
R 0
0: CMOS
1
PD1ODE 0
0: CMOS 1: Open
0
PD0ODE 0
0: CMOS 1: Open
R/W
R/W
drain
drain
drain
drain
drain
Function SCLK2 output setting SCLK2 input setting CTS2 input setting TXD3 output setting RXD3 input setting SCLK3 output setting SCLK3 input setting CTS3 input setting TXD4 output setting RXD4 output setting SCLK4 output setting SCLK4 input setting CTS4 input setting INT9 input setting
Corresponding BIT of PDFC 1 1 1 1 1 1 1 1 1 1 1 1 1 1(*1)
Corresponding BIT of PDCR 1 0 0 1 0 1 0 0 1 1 1 0 0 0
PORT to be used PD0 PD1 PC2 PD3 PD4 PD5 PD6 PD7
(*1) This bit setting is used only if an interrupt must be generated to clear the STOP status and if SYSCR is set to 0. In all other cases, this bit setting does not need to be used. Fig. 7.12.5 Port D Registers
TMP19A64 (rev1.1) 7-39
TMP19A64C1D
7.13 Port E (PE0 through PE7)
The port E is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PECR. A reset allows PECR to be reset to "0" and the port E to function as an input port. Besides the input/output port function, the port E performs other functions: PE0 outputs SIO data, PE1 inputs SIO data, PE2 inputs and outputs SIO CLK or inputs CTS, and PE6 and PE7 input external interrupts. These functions are enabled by setting corresponding bits of PEFC to "1." A reset allows PECR and PEFC to be cleared to "0" and the port E to function as an input port.
Direction control (PECR) (in units of bits)
Function control (PEFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PE) 0 S Selector TXD5 output 1 Open drain setting possible
PEODE
PE0 (TXD5)
S Selector PE read
1
0
Fig. 7.13.1 Port E (PE0)
TMP19A64 (rev1.1) 7-40
TMP19A64C1D
Direction control (PECR) (in units of bits)
Internal data bus
Function control (PEFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PE) PE1 (RXD5)
S Selector PE read RXD5 input
1
0
Fig. 7.13.2 Port E (PE1)
TMP19A64 (rev1.1) 7-41
TMP19A64C1D
Direction control (PECR) (in units of bits)
Function control (PEFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PE) 0 S Selector SCLK5 output 1 Open drain setting possible
PEODE
PE2 (SCLK5/CTS5)
S Selector PE read CTS5 SCLK5
1
0
Fig. 7.13.3 Port E (PE2)
TMP19A64 (rev1.1) 7-42
TMP19A64C1D
Direction control (PECR) (in units of bits)
Internal data bus
STOP MODE SYSCR2
Reset Output latch (PE) PE3 PE4 PE5 S Selector PE read 0 1
Fig. 7.13.4 Port E (PE3, PE4, PE5)
TMP19A64 (rev1.1) 7-43
TMP19A64C1D
Direction control (PECR) (in units of bits) STOP MODE SYSCR2
Function control (PEFC) (in units of bits) Internal data bus
Output latch (PE)
PE6 (INTA) PE7 (INTB) Reset S Selector 1
PE read
0
INTA INTB
Fig. 7.13.5 Port E (PE6, PE7)
TMP19A64 (rev1.1) 7-44
TMP19A64C1D
Port E register 7
PE (0xFFFF_F053) Bit Symbol Read/Write After reset PE7
6
PE6
5
PE5
4
PE4
3
PE3
2
PE2
1
PE1
0
PE0
R/W Input mode (output latch register is set to "1.")
Port E control register 7
PECR (0xFFFF_F057) Bit Symbol Read/Write After reset Function PE7C 0
6
PE6C 0
5
PE5C 0
4
PE4C R/W 0 0: Input
3
PE3C 0 1: Output
2
PE2C 0
1
PE1C 0
0
PE0C 0
Port E function register 7
PEFC (0xFFFF_F05B) Bit Symbol Read/Write After reset Function PE7F 0
0: PORT 1: INTB
6
PE6F 0
0: PORT 1: INTA
5
PE5F 0
0: PORT
4
PE4F R/W 0
0: PORT
3
PE3F 0
0: PORT
2
PE2F 0
0: PORT 1: SCLK5 / CTS5
1
PE1F 0
0: PORT 1: RXD5
0
PE0F 0
0: PORT 1: TXD5
Port E open drain control register 7
PEODE (0xFFFF_F05F) Bit Symbol Read/Write After reset Function 0
0: CMOS
6
5
R 0
0: CMOS
4
3
2
PE2ODE R/W 0
0: CMOS 1: Open
1
R 0
0: CMOS
0
PE0ODE R/W 0
0: CMOS 1: Open
0
0: CMOS
0
0: CMOS
0
0: CMOS
drain
drain
Function TXD5 output setting RXD3 output setting SCLK5 output setting SCLK5 input setting CTS5 input setting INTA input setting INTB input setting
Corresponding BIT of PEFC 1 1 1 1 1 1(*1) 1(*1)
Corresponding BIT of PECR 1 0 1 0 0 0 0
PORT to be used PE0 PE1 PE2 PE6 PE7
(*1) This bit setting is used only if an interrupt must be generated to clear the STOP status and if SYSCR is set to 0. In all other cases, this bit setting does not need to be used. Fig. 7.13.6 Port E Registers
TMP19A64 (rev1.1) 7-45
TMP19A64C1D
7.14 Port F (PF0 through PF7)
The port F is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PFCR. A reset allows PFCR to be reset to "0" and the port F to function as an input port. Besides the input/output port function, the port F performs other functions: PF0 through PF2 input and output SB1, PE3 and PE5 input the DMA request signal, PF4 and PF6 output the DMA acknowledge signal, and PF7 inputs external clock sources of a 32-bit time base timer. These functions are enabled by setting corresponding bits of PFFC to "1." A reset allows PFCR and PFFC to be cleared to "0" and the port F to function as an input port. The DMAC function is shared by PF3 through PF6 and PJ0 through PJ3. To give PF0 through PF3 the precedence in using the DMAC function, the corresponding bit of PFFC must be set to "1."
Direction control (PFCR) (in units of bits)
Function control (PFFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Output latch (PF) 0 S Selector SO output SDA output 1 Open drain setting possible
PFODE
PF0 (SO/SDA) Reset
S Selector PF read SDA input
1
0
Fig. 7.14.1 Port F (PF0)
TMP19A64 (rev1.1) 7-46
TMP19A64C1D
Direction control (PFCR) (in units of bits)
Function control (PFFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Output latch (PF) 0 S Selector SCL output 1 Open drain setting possible
PFODE
PF1 (SI/SCL) Reset
S Selector PF read SI input SCL input
1
0
Fig. 7.14.2 Port F (PF1)
TMP19A64 (rev1.1) 7-47
TMP19A64C1D
Direction control (PFCR) (in units of bits)
Function control (PFFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Output latch (PF) 0 S Selector SCK output 1 PF2 (SCK) Reset
S Selector PF read SCK input
1
0
Fig. 7.14.3 Port F (PF2)
TMP19A64 (rev1.1) 7-48
TMP19A64C1D
Direction control (PFCR) (in units of bits)
Internal data bus
Function control (PFFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PF) PF3 (DREQ2) PF5 (DREQ3) S Selector PF read DREQ2 input DREQ3 input 0 1
Fig. 7.14.4 Port F (PF3, PF5)
TMP19A64 (rev1.1) 7-49
TMP19A64C1D
Direction control (PFCR) (in units of bits)
Function control (PFFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PF) 0 Selector DACK2 output DACK3 output S 1 Selector PF read 0 1 PF4 (DACK2) PF6 (DACK3) S
Fig. 7.14.5 Port F (PF4, PF6)
TMP19A64 (rev1.1) 7-50
TMP19A64C1D
Direction control (PFCR) (in units of bits)
Internal data bus
Function control (PFFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PF) PF7 (TBTIN)
S Selector PF read TBTIN
1
0
Fig. 7.14.6 Port F (PF7)
TMP19A64 (rev1.1) 7-51
TMP19A64C1D
Port F register 7
PF (0xFFFF_F060) Bit Symbol Read/Write After reset PF7
6
PF6
5
PF5
4
PF4
3
PF3
2
PF2
1
PF1
0
PF0
R/W Input mode (output latch register is set to "1.")
Port F control register 7
PFCR (0xFFFF_F064) Bit Symbol Read/Write After reset Function PF7C 0
6
PF6C 0
5
PF5C 0
4
PF4C R/W 0 0: Input
3
PF3C 0 1: Output
2
PF2C 0
1
PF1C 0
0
PF0C 0
Port F function register 7
PFFC (0xFFFF_F068) Bit Symbol Read/Write After reset Function PF7F 0
0: PORT 1: TBTIN
6
PF6F 0
0: PORT 1: DACK3
5
PF5F 0
0: PORT 1: DREQ3
4
PF4F R/W 0
0: PORT 1: DACK2
3
PF3F 0
0: PORT 1: DREQ2
2
PF2F 0
0: PORT 1: SCK
1
PF1F 0
0: PORT 1: SI / SCL
0
PF0F 0
0: PORT 1: SO / SDA
Port F open drain control register 7
PFODE (0xFFFF_F06C) Bit Symbol Read/Write After reset Function R 0
0: CMOS
6
5
4
3
2
1
PF1ODE R/W
0
PF0ODE 0
0: CMOS 1: Open
0
0: CMOS
0
0: CMOS
0
0: CMOS
0
0: CMOS
0
0: CMOS
0
0: CMOS 1: Open
drain
drain
Function SO output setting SDA output setting SDA input setting SI input setting SCL output setting SCL input setting SCLK5 output setting SCLK5 input setting DREQ2 input setting DACK2 output setting DREQ3 input setting DACK3 output setting TBTIN input setting
Corresponding BIT of PFFC 1 1 1 1 1 1 1 1 1 1 1 1 1
Corresponding BIT of PFCR 1 1 0 0 1 0 1 0 0 1 0 1 0
PORT to be used
PF0
PF1 PF2 PF3 PF4 PF5 PF6 PF7
(Note)
The DMAC function is shared by the port F and the port J. If both ports are set to use the DMAC function, the port F is given priority in using the DMAC function. Fig. 7.14.7 Port F Registers
TMP19A64 (rev1.1) 7-52
TMP19A64C1D
7.15 Port G (PG0 through PG7)
The port G is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PGCR. A reset allows PGCR to be reset to "0" and the port G to function as an input port. Besides the input/output port function, the port G performs other functions: PG0 through PG3 input a 32-bit input capture trigger, and PG4 through PG7 output a 32-bit output compare. These functions are enabled by setting corresponding bits of PGFC to "1." A reset allows PGCR and PGFC to be cleared to "0" and the port G to function as an input port.
Direction control (PGCR) (in units of bits)
Internal data bus
Function control (PGFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PG) PG0 (TC0IN) PG1 (TC1IN) PG2 (TC2IN) PG3 (TC3IN) S Selector PG read TC0IN, TC1IN TC2IN, TC3IN 0 1
Fig. 7.15.1 Port G (PG0 through PG3)
TMP19A64 (rev1.1) 7-53
TMP19A64C1D
Direction control (PGCR) (in units of bits)
Function control (PGFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PG) 0 Selector Timer F/F OUT TCOUT0 TCOUT1 TCOUT2 TCOUT3 1 S PG4 (TCOUT0) PG5 (TCOUT1) PG6 (TCOUT2) PG7 (TCOUT3)
S 1 Selector PG read 0
Fig. 7.15.2 Port G (PG4 through PG7)
TMP19A64 (rev1.1) 7-54
TMP19A64C1D
Port G register 7
PG (0xFFFF_F061) Bit Symbol Read/Write After reset PG7
6
PG6
5
PG5
4
PG4
3
PG3
2
PG2
1
PG1
0
PG0
R/W Input mode (output latch register is set to "1.")
Port G control register 7
PGCR (0xFFFF_F065) Bit Symbol Read/Write After reset Function PG7C 0
6
PG6C 0
5
PG5C 0
4
PG4C R/W 0 0: Input
3
PG3C 0 1: Output
2
PG2C 0
1
PG1C 0
0
PG0C 0
Port G function register 7
PGFC (0xFFFF_F069) Bit Symbol Read/Write After reset Function PG7F 0
0: PORT 1: TCOUT3
6
PG6F 0
0: PORT 1: TCOUT2
5
PG5F 0
0: PORT 1: TCOUT1
4
PG4F R/W 0
0: PORT 1: TCOUT0
3
PG3F 0
0: PORT 1: TC3IN
2
PG2F 0
0: PORT 1: TC2IN
1
PG1F 0
0: PORT 1: TC1IN
0
PG0F 0
0: PORT 1: TC0IN
Function TC0IN input setting TC1IN input setting TC2IN input setting TC3IN input setting TCOUT0 output setting TCOUT1 output setting TCOUT2 output setting TCOUT3 output setting
Corresponding BIT of PGFC 1 1 1 1 1 1 1 1
Corresponding BIT of PGCR 0 0 0 0 1 1 1 1
PORT to be used PG0 PG1 PG2 PG3 PG4 PG5 PG6 PG7
Fig. 7.15.2 Port G Registers
TMP19A64 (rev1.1) 7-55
TMP19A64C1D
7.16 Port H (PH0 through PH7)
The port H is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PHCR. A reset allows PHCR to be reset to "0" and the port H to function as an input port. Besides the input/output port function, the port H performs another function: PH0 through PH5 output the 32-bit output compare. This function is enabled by setting the corresponding bit of PHFC to "1." A reset allows PHCR and PHFC to be cleared to "0" and the port H to function as an input port.
Direction control (PHCR) (in units of bits)
Function control (PHFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PH) 0 Selector Timer F/F OUT TCOUT4, TCOUT5 TCOUT6, TCOUT7 TCOUT8, TCOUT9 1 S
PH0 (TCOUT4) PH1 (TCOUT5) PH2 (TCOUT6) PH3 (TCOUT7) PH4 (TCOUT8) PH5 (TCOUT9)
S 1 Selector
PH read
0
Fig. 7.16.1 Port H (PH0 through PH5)
TMP19A64 (rev1.1) 7-56
TMP19A64C1D
Direction control (PHCR) (in units of bits)
Internal data bus
STOP MODE SYSCR2
Reset Output latch (PH) PH6 PH7
S Selector PH read
1
0
Fig. 7.16.2 Port H (PH6, PH7)
TMP19A64 (rev1.1) 7-57
TMP19A64C1D
Port H register 7
PH (0xFFFF_F062) Bit Symbol Read/Write After reset PH7
6
PH6
5
PH5
4
PH4
3
PH3
2
PH2
1
PH1
0
PH0
R/W Input mode (output latch register is set to "1.")
Port H control register 7
PHCR (0xFFFF_F066) Bit Symbol Read/Write After reset Function PH7C 0
6
PH6C 0
5
PH5C 0
4
PH4C R/W 0 0: Input
3
PH3C 0 1: Output
2
PH2C 0
1
PH1C 0
0
PH0C 0
Port H function register 7
PHFC (0xFFFF_F06A) Bit Symbol Read/Write After reset Function R 0
0: PORT
6
5
PH5F
4
PH4F 0
0: PORT 1: TCOUT8
3
PH3F R/W 0
0: PORT 1: TCOUT7
2
PH2F 0
0: PORT 1: TCOUT6
1
PH1F 0
0: PORT 1: TCOUT5
0
PH0F 0
0: PORT 1: TCOUT4
0
0: PORT
0
0: PORT 1: TCOUT9
Function TCOUT4 output setting TCOUT5 output setting TCOUT6 output setting TCOUT7 output setting TCOUT8 output setting TCOUT9 output setting
Corresponding BIT of PHFC 1 1 1 1 1 1
Corresponding BIT of PHCR 1 1 1 1 1 1
PORT to be used PH0 PH1 PH2 PH3 PH4 PH5
Fig. 7.16.3 Port H Registers
TMP19A64 (rev1.1) 7-58
TMP19A64C1D
7.17 Port I (PI0 through PI4)
The port I is a general-purpose, 5-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PICR. A reset allows PICR to be reset to "0" and the port I to function as an input port. Besides the input/output port function, the port I performs another function: PI0 through PI4 input external interrupts. This function is enabled by setting the corresponding bit of PIFC to "1." A reset allows PICR and PIFC to be cleared to "0" and the port I to function as an input port. The external interrupt function is shared by PI0 through PI4 and PO0 through PO4. To give PO0 through PO4 the precedence in using the external interrupt function, the corresponding bit of POFC must be set to the interrupt function.
Direction control (PICR) (in units of bits) STOP MODE SYSCR2
Function control (PIFC) (in units of bits) Internal data bus
Output latch (PI)
PI0 (INT0) PI1 (INT1) PI2 (INT2) PI3 (INT3) PI4 (INT4) Reset S Selector 1
PI read INT0 INT1 INT2 INT3 INT4
0
Fig. 7.17.1 Port I (PI0 through PI4)
TMP19A64 (rev1.1) 7-59
TMP19A64C1D
Port I register 7
PI (0xFFFF_F063) Bit Symbol Read/Write After reset R
6
5
4
PI4
3
PI3
2
PI2
1
PI1
0
PI0
R/W Input mode (output latch register is set to "1.")
Port I control register 7
PICR (0xFFFF_F063) Bit Symbol Read/Write After reset Function 0 R 0 0
6
5
4
PI4C 0
3
PI3C 0
2
PI2C
1
PI1C
0
PI0C 0
R/W 0 0 0: Input 1: Output
Port I function register 7
PIFC (0xFFFF_F06B) Bit Symbol Read/Write After reset Function
6
R 0
5
4
PI4F
3
PI3F 0
0: PORT 1: INT3
2
PI2F R/W 0
0: PORT 1: INT2
1
PI1F 0
0: PORT 1: INT1
0
PI0F 0
0: PORT 1: INT0
0
0
0
0: PORT 1: INT4
Function INT0 input setting INT1 input setting INT2 input setting INT3 input setting INT4 input setting
Corresponding BIT of PIFC 1 (*1) 1 (*1) 1 (*1) 1 (*1) 1 (*1)
Corresponding BIT of PICR 0 0 0 0 0
PORT to be used PI0 PI1 PI2 PI3 PI4
(Note*1) This bit setting is used only if an interrupt must be generated to clear the STOP status and if SYSCR is set to 0. In all other cases, this bit setting does not need to be used. (Note) The external interrupt function is shared by the port I and the port O. If both ports are set to use the external interrupt function, the port O is given priority in using the external interrupt function. Fig. 7.17.2 Port I Registers
TMP19A64 (rev1.1) 7-60
TMP19A64C1D
7.18 Port J (PJ0 through PJ3)
The port J is a general-purpose, 4-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PJCR. A reset allows PJCR to be reset to "0" and the port J to function as an input port. Besides the input/output port function, the port J performs other functions: PJ0 and PJ2 input the DMA request signal, and PJ1 and PJ3 output the DMA acknowledge signal. These functions are enabled by setting the corresponding bits of PJFC to "1." A reset allows PJCR and PJFC to be cleared to "0" and the port J to function as an input port. The DMAC function is shared by PJ0 through PJ3 and PF3 through PF6. To give PF0 through PF3 the precedence in using the DMAC function over PJ0 through PJ3, the corresponding bit of PFFC must be set to "1."
Direction control (PJCR) (in units of bits)
Internal data bus
Function control (PJFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PJ) PJ0 (DREQ2) PJ2 (DREQ3) S Selector PJ read DREQ2 input DREQ3 input 0 1
Fig. 7.18.1 Port J (PJ0, PJ2)
TMP19A64 (rev1.1) 7-61
TMP19A64C1D
Direction control (PJCR) (in units of bits)
Function control (PJFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PJ) 0 Selector DACK2 output DACK3 output S 1 Selector PJ read 0 1 PJ1 (DACK2) PJ3 (DACK3) S
Fig. 7.18.2 Port J (PJ1, PJ3)
TMP19A64 (rev1.1) 7-62
TMP19A64C1D
Port J register 7
PJ (0xFFFF_F070) Bit Symbol Read/Write After reset R Input mode (output latch register is set to "1.")
6
5
4
3
PJ3
2
PJ2 R/W
1
PJ1
0
PJ0
Port J control register 7
PJCR (0xFFFF_F074) Bit Symbol Read/Write After reset Function R 0 0 0 0 0
6
5
4
3
PJ3C
2
PJ2C R/W 0 0: Input
1
PJ1C 0 1: Output
0
PJ0C 0
Port J function register 7
PJFC (0xFFFF_F078) Bit Symbol Read/Write After reset Function
6
R
5
4
3
PJ3F
2
PJ2F R/W 0
0: PORT 1: DREQ3
1
PJ1F 0
0: PORT 1: DACK2
0
PJ0F 0
0: PORT 1: DREQ2
0
0
0
0
0
0: PORT 1: DACK3
Function DREQ2 input setting DACK2 output setting DREQ3 input setting DACK3 output setting
Corresponding BIT of PJFC 1 1 1 1
Corresponding BIT of PJCR 0 1 0 1
PORT to be used PJ0 PJ1 PJ2 PJ3
(Note)
The DMAC function is shared by the port F and the port J. If both ports are set to use the DMAC function, the port F is given priority in using the DMAC function. Fig. 7.18.3 Port J Registers
TMP19A64 (rev1.1) 7-63
TMP19A64C1D
7.19 Port K (PK0 through PK7)
The port K is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PKCR. A reset allows PKCR to be reset to "0" and the port K to function as an input port. Besides the input/output port function, PK0 through PK7 perform the KEY input function. This function is enabled by setting the corresponding bit of PKFC to "1." A reset allows PKCR and PKFC to be cleared to "0" and the port K to function as an input port. The ports K0 through K7 have a pull-up resistor function. This function is enabled only if KUPPUP of the key-on wake-up circuit is set to "1" and if KEY input is enabled by KWUPSTn. For further details, refer to the section where key-on wake-up is discussed. If these ports are in operation, the pull-up function is disabled.
Direction control (PKCR) (in units of bits) STOP MODE SYSCR2
Function control (PKFC) (in units of bits) Internal data bus KUPPUP
Output latch (PK)
PK0 (KEY0), PK2 (KEY2), PK4 (KEY4), PK6 (KEY6), Reset S Selector 1
PK1 (KEY1) PK3 (KEY3) PK5 (KEY5) PK7 (KEY7)
PK read PK0, PK2, PK4, PK6, PK1 PK3 PK5 PK7
0
Fig. 7.19.1 Port K (PK0 through PK7)
TMP19A64 (rev1.1) 7-64
TMP19A64C1D
Port K register 7
PK (0xFFFF_F071) Bit Symbol Read/Write After reset PK7
6
PK6
5
PK5
4
PK4
3
PK3
2
PK2
1
PK1
0
PK0
R/W Input mode (output latch register is set to "1.")
Port K control register 7
PKCR (0xFFFF_F075) Bit Symbol Read/Write After reset Function PK7C 0
6
PK6C 0
5
PK5C 0
4
PK4C
3
PK3C
2
PK2C 0
1
PK1C 0
0
PK0C 0
R/W 0 0 0: Input 1: Output
Port K function register 7
PKFC (0xFFFF_F079) Bit Symbol Read/Write After reset Function PK7F 0
0: PORT 1: KEY7
6
PK6F 0
0: PORT 1: KEY6
5
PK5F 0
0: PORT 1: KEY5
4
PK4F R/W 0
0: PORT 1: KEY4
3
PK3F 0
0: PORT 1: KEY3
2
PK2F 0
0: PORT 1: KEY2
1
PK1F 0
0: PORT 1: KEY1
0
PK0F 0
0: PORT 1: KEY0
Function KEY0 input setting KEY1 input setting KEY2 input setting KEY3 input setting KEY4 input setting KEY5 input setting KEY6 input setting KEY7 input setting
Corresponding BIT of PKFC 1 1 1 1 1 1 1 1
Corresponding BIT of PKCR 0 0 0 0 0 0 0 0
PORT to be used PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7
(*1) This bit setting is used only if an interrupt must be generated to clear the STOP status and if SYSCR is set to 0. In all other cases, this bit setting does not need to be used. Fig. 7.19.2 Port K Registers
TMP19A64 (rev1.1) 7-65
TMP19A64C1D
7.20 Port L (PL0 through PL7)
The port L is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PLCR. A reset allows PLCR to be reset to "0" and the port L to function as an input port.
Direction control (PLCR) (in units of bits)
Internal data bus
STOP MODE SYSCR2
Reset PL0 PL1 PL2 PL3 PL4 PL5 PL6 PL7
Output latch (PL)
S Selector PL read
1
0
Fig. 7.20.1 Port L (PL0 through PL7)
TMP19A64 (rev1.1) 7-66
TMP19A64C1D
Port L register 7
PL (0xFFFF_F0C0) Bit Symbol Read/Write After reset PL7
6
PL6
5
PL5
4
PL4
3
PL3
2
PL2
1
PL1
0
PL0
R/W Input mode (output latch register is set to "1.")
Port L control register 7
PLCR (0xFFFF_F0C4) Bit Symbol Read/Write After reset Function PL7C 0
6
PL6C 0
5
PL5C 0
4
PL4C R/W 0 0: Input
3
PL3C 0 1: Output
2
PL2C 0
1
PL1C 0
0
PL0C 0
L ()
7
PLFC Bit Symbol (0xFFFF_F0C8 Read/Write ) PL7F
6
PL6F
5
PL5F
4
PL4F R/W
3
PL3F
2
PL2F
1
PL1F
0
PL0F

0
0: PORT 1: DB7
0
0: PORT 1: DB6
0
0: PORT 1: DB5
0
0: PORT 1: DB4
0
0: PORT 1: DB3
0
0: PORT 1: DB2
0
0: PORT 1: DB1
0
0: PORT 1: DB0
7.20.2 L
TMP19A64 (rev1.1) 7-67
TMP19A64C1D
7.21 Port M (PM0 through PM7)
The port M is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PMCR. A reset allows PMCR to be reset to "0" and the port M to function as an input port.
Direction control (PMCR) (in units of bits)
Internal data bus
STOP MODE SYSCR2
Reset
Output latch (PM)
S Selector PM read
1
PM0 PM1 PM2 PM3 PM4 PM5 PM6 PM7
0
Fig. 7.21.1 Port M (PM0 through PM7)
TMP19A64 (rev1.1) 7-68
TMP19A64C1D
Port M register 7
PM (0xFFFF_F0C1) Bit Symbol Read/Write After reset PM7
6
PM6
5
PM5
4
PM4
3
PM3
2
PM2
1
PM1
0
PM0
R/W Input mode (output latch register is set to "1.")
Port M control register 7
PMCR (0xFFFF_F0C5) Bit Symbol Read/Write After reset Function PM7C 0
6
PM6C 0
5
PM5C 0
4
PM4C R/W 0 0: Input
3
PM3C 0 1: Output
2
PM2C 0
1
PM1C 0
0
PM0C 0
M ()
7
PMFC Bit Symbol (0xFFFF_F0C9 Read/Write ) R 0
0:PORT
6
5
PM5F
4
PM4F
3
PM3F R/W
2
PM2F
1
PM1F
0
PM0F

0
0:PORT
0
0: PORT 1: DB13
0
0: PORT 1: DB12
0
0: PORT 1: DB11
0
0: PORT 1: DB10
0
0: PORT 1: DB9
0
0: PORT 1: DB8
7.21.2 M
TMP19A64 (rev1.1) 7-69
TMP19A64C1D
7.22 Port N (PN0 through PN7)
The port N is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PNCR. A reset allows PNCR to be reset to "0" and the port N to function as an input port.
Direction control (PNCR) (in units of bits)
Internal data bus
STOP MODE SYSCR2
Reset PN0 PN1 PN2 PN3 PN4 PN5 PN6 PN7
Output latch (PN)
S Selector PN read
1
0
Fig. 7.22.1 Port N (PN0 through PN7)
TMP19A64 (rev1.1) 7-70
TMP19A64C1D
Port N register 7
PN (0xFFFF_F0C2) Bit Symbol Read/Write After reset PN7
6
PN6
5
PN5
4
PN4
3
PN3
2
PN2
1
PN1
0
PN0
R/W Input mode (output latch register is set to "1.")
Port N control register 7
PNCR (0xFFFF_F0C6) Bit Symbol Read/Write After reset Function PN7C 0
6
PN6C 0
5
PN5C 0
4
PN4C R/W 0 0: Input
3
PN3C 0 1: Output
2
PN2C 0
1
PN1C 0
0
PN0C 0
N ()
7
PNFC (0xFFFF_F0C A) Bit Symbol Read/Write
6
R
5
4
3
PN3F
2
PN2F R/W
1
PN1F
0
PN0F

0
0:PORT
0
0:PORT
0
0:PORT
0
0:PORT
0
0: PORT 1:STATUS1
0
0: PORT 1:STATUS0
0
0: PORT 1: FCLK
0
0: PORT 1: BUSY
7.22.2 N
TMP19A64 (rev1.1) 7-71
TMP19A64C1D
7.23 Port O (PO0 through PO7)
The port O is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register POCR. Besides the input/output port function, the port O performs another function: PO0 through PO4 input external interrupts. This function is enabled by setting the corresponding bit of POFC to "1." A rest allows POCR and POFC to be cleared to "0" and the port O to function as an input port. The external interrupt function is shared by PO0 through PO4 and PI0 through PI4. To give PO0 through PO4 the precedence in using the external interrupt function, the corresponding bit of POFC must be set to the interrupt function.
Direction control (POCR) (in units of bits) STOP MODE SYSCR2
Function control (POFC) (in units of bits) Internal data bus
Output latch (PO)
PO0 (INT0) PO1 (INT1) PO2 (INT2) PO3 (INT3) PO4 (INT4) Reset S Selector 1
PO read INT0 INT1 INT2 INT3 INT4
0
Fig. 7.23.1 Port O (PO0 through PO4)
TMP19A64 (rev1.1) 7-72
TMP19A64C1D
Direction control (POCR) (in units of bits)
Function control (POFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PO) 0 S Selector TXD6 output 1 Open drain setting possible
POODE
PO5 (TXD6)
S Selector PO read
1
0
Fig. 7.23.2 Port O (PO5)
TMP19A64 (rev1.1) 7-73
TMP19A64C1D
Direction control (POCR) (in units of bits)
Internal data bus
Function control (POFC) (in units of bits)
STOP MODE SYSCR2
Reset Output latch (PO) PO6 (RXD6)
S Selector PO read RXD6 input
1
0
Fig. 7.23.3 Port O (PO6)
TMP19A64 (rev1.1) 7-74
TMP19A64C1D
Direction control (POCR) (in units of bits)
Function control (POFC) (in units of bits) Internal data bus
STOP MODE SYSCR2
Reset Output latch (PO) 0 S Selector SCLK6 output 1 Open drain setting possible
POODE
PO7 (SCLK6/CTS6)
S Selector PO read CTS6 SCLK6
1
0
Fig. 7.23.4 Port O (PO7)
TMP19A64 (rev1.1) 7-75
TMP19A64C1D
Port O register 7
PO (0xFFFF_F0C3) Bit Symbol Read/Write After reset PO7
6
PO6
5
PO5
4
PO4
3
PO3
2
PO2
1
PO1
0
PO0
R/W Input mode (output latch register is set to "1.")
Port O control register 7
POCR (0xFFFF_F0C7) Bit Symbol Read/Write After reset Function PO7C 0
6
PO6C 0
5
PO5C 0
4
PO4C R/W 0 0: Input
3
PO3C 0 1: Output
2
PO2C 0
1
PO1C 0
0
PO0C 0
Port O function register 7
POFC Bit Symbol (0xFFFF_F0CB) Read/Write After reset Function
6
5
4
PO4F R/W
3
PO3F 0
0: PORT 1: INT3
2
PO2F 0
0: PORT 1: INT2
1
PO1F 0
0: PORT 1: INT1
0
PO0F 0
0: PORT 1: INT0
0
0: PORT 1: SCLK6 CTS6
0
0: PORT 1: RXD6
0
0: PORT 1: TXD6
0
0: PORT 1: INT4
Port O open drain control register 7
POODE (0xFFFF_F0CF) Bit Symbol Read/Write After reset Function PO7ODE R/W 0
0: CMOS 1: Open
6
R 0
0: CMOS
5
PO5ODE R/W 0
0: CMOS 1: Open
4
R 0
0: CMOS
3
R 0
0: CMOS
2
R 0
0: CMOS
1
R 0
0: CMOS
0
R 0
0: CMOS
drain
drain
Function INT0 input setting INT1 input setting INT2 input setting INT3 input setting INT4 input setting TXD6 output setting RTD6 input setting SCLK6 output setting SCLK6 input setting CTS6 input setting
Corresponding BIT of POFC 1(*1) 1(*1) 1(*1) 1(*1) 1(*1) 1 1 1 1 1
Corresponding BIT of POCR 0 0 0 0 0 1 0 1 0 0
PORT to be used PO0 PO1 PO2 PO3 PO4 PO5 PO6 PO7
(*1) This bit setting is used only if an interrupt must be generated to clear the STOP status and if SYSCR is set to 0. In all other cases, this bit setting does not need to be used. (Note) The external interrupt function is shared by the port 1 and the port 0. If both ports are set to use the external interrupt function, the port 0 is given priority in using the external interrupt function. Fig. 7.23.5 Port O Registers
TMP19A64 (rev1.1) 7-76
TMP19A64C1D
7.24 Port P (PP0 through PP7)
The port P is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PPCR. Besides the input/output port function, the port P performs another function: PP0 through PP7 output the signal for EJTAG. This function is enabled by a combination of the EJTAG debug level and the corresponding bit of PPFC. A reset allows PPCR and PPFC to be cleared to "0" and the port P to function as an input port. If DSU-ICE is used for debugging, the port P outputs the signal for EJTAG. Therefore, it is recommended not to use the port P as an input/output port.
Direction control (PPCR) (in units of bits) EJTAG debug level
STOP MODE SYSCR2 Internal data bus Function control (PPFC) (in units of bits)
S Selector
Output latch (PP)
0 1 TPD
Y Output buffer
PP0 (TPD0) PP1 (TPD1) PP2 (TPD2) PP3 (TPD3) PP4 (TPD4) PP5 (TPD5) PP6 (TPD6) PP7 (TPD7) Reset
S 1 Selector Y 0
PP read
Fig. 7.24.1 Port P (PP0 through PP7)
(Note)
The above system diagram does not show the debug function.
TMP19A64 (rev1.1) 7-77
TMP19A64C1D
Port P register 7
PP (0xFFFF_F0D0) Bit Symbol Read/Write After reset PP7
6
PP6
5
PP5
4
PP4
3
PP3
2
PP2
1
PP1
0
PP0
R/W Input mode (output latch register is set to "1.")
Port P control register 7
PPCR (0xFFFF_F0D4) Bit Symbol Read/Write After reset Function PP7C 0
6
PP6C 0
5
PP5C 0
4
PP4C R/W 0 0: Input
3
PP3C 0 1: Output
2
PP2C 0
1
PP1C 0
0
PP0C 0
Port P function register 7
PPFC (0xFFFF_F0D8) Bit Symbol Read/Write After reset Function PP7F 0
6
PP6F 0
5
PP5F 0
0: PORT 1: TPD5/TPC5
4
PP4F R/W 0
0: PORT 1: TPD4/TPC4
3
PP3F 0
0: PORT 1: TPD3/TPC3
2
PP2F 0
0: PORT 1: TPD2/TPC2
1
PP1F 0
0: PORT 1: TPD1/TPC1
0
PP0F 0
0: PORT 1: TPD0/TPC0
0: PORT 0: PORT 1: TPD7/TPC7 1: TPD6/TPC6
Fig. 7.24.2 Port P Registers Note) If the port P or the port Q is used to generate the output signal for EJTAG, a necessary port P or Q setting must be made using a tool. The PPFC register setting must be made in units of bites.
Level 0 PORT P PORT Q PORT PORT
Level 1 PORT TPC
Level 2 PPFC=#FF TPD PORT PPFC#FF PORT TPD
Level 3 TPD TPC
Fig. 7.24.3 Ports P and Q function relative to debug levels Note) For information on debug levels and other details, refer to the DSU Probe Handling Manual.
TMP19A64 (rev1.1) 7-78
TMP19A64C1D
7.25 Port Q (PQ0 through PQ7)
The port Q is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be specified in units of bits by using the control register PQCR. Besides the input/output port function, PQ0 through PQ7 output the signal for EJTAG. This function is enabled by a combination of a debug level and the corresponding bit of PPFC. A reset allows PQCR and PPFC to be cleared to "0" and the port Q to function as an input port. If DSU-ICE is used for debugging, the port Q outputs the signal for EJTAG. Therefore, it is recommended not to use the port Q as an input/output port.
Direction control (PQCR) (in units of bits) EJTAG debug level
STOP MODE SYSCR2 Internal data bus Function control (PPFC) (in units of bits)
S Selector
Output latch (PQ)
0 1
Y Output buffer
TPD/TPC
PQ0 (TPD0/TPC0) PQ1 (TPD1/TPC1) PQ2 (TPD2/TPC2) PQ3 (TPD3/TPC3) PQ4 (TPD4/TPC4) PQ5 (TPD5/TPC5) PQ6 (TPD6/TPC6) PQ7 (TPD7/TPC7) Reset
S 1 Selector Y 0
PP read
Fig. 7.25.1 Port Q (PQ0 through PQ7)
(Note)
The above system diagram does not show the debug function.
TMP19A64 (rev1.1) 7-79
TMP19A64C1D
Port Q register 7
PQ (0xFFFF_F0D1) Bit Symbol Read/Write After reset PQ7
6
PQ6
5
PQ5
4
PQ4
3
PQ3
2
PQ2
1
PQ1
0
PQ0
R/W Input mode (output latch register is set to "1.")
Port Q control register 7
PQCR (0xFFFF_F0D5) Bit Symbol Read/Write After reset Function PQ7C 0
6
PQ6C 0
5
PQ5C 0
4
PQ4C R/W 0 0: Input
3
PQ3C 0 1: Output
2
PQ2C 0
1
PQ1C 0
0
PQ0C 0
Fig. 7.25.2 Port Q Registers
TMP19A64 (rev1.1) 7-80
TMP19A64C1D
8.
External Bus Interface
The TMP19A64 has a built-in external bus interface function to connect to external memory, I/Os, etc. This interface consists of an external bus interface circuit (EBIF), a chip selector (CS) and a wait controller. The chip selector and wait controller designate mapping addresses in a 6-block address space and also control wait states and data bus widths (8- or 16-bit) in these and other external address spaces. The external bus interface circuit (EBIF) controls the timing of external buses based on the chip selector and wait controller settings. The EBIF also controls the dynamic bus sizing and the bus arbitration with the external bus master. External bus mode Selectable address, data separator bus mode and multiplex mode Wait function This function can be enabled for each block. * * A wait of up to 7 clocks can be automatically inserted. A wait can be inserted via the WAIT / RDY pin.
Data bus width Either an 8- or 16-bit width can be set for each block. Recovery cycle (read/write) If an external bus cycle is in progress, a dummy cycle of up to 2 clocks can be inserted and this dummy cycle can be specified for each block. Recovery cycle (chip selector) When an external bus is selected, a dummy cycle of up to 1 clock can be inserted and this dummy cycle can be specified for each block. Bus arbitration function
TMP19A64 (rev1.1) 8-1
TMP19A64C1D
8.1 Address and Data Pins
(1) Address and data pin settings The TMP19A64 can be set to either separate bus or multiplexed bus mode. Setting the BUSMD pin to the "L" level at a reset activates the separate bus mode, and setting the pin to the "H" level activates the multiplexed bus mode. Port pins 0, 1, 2, 5 and 6, which are to be connected to external devices (memory), are used as address buses, data buses and address/data buses. Table 8.1.1 shows these. Table 8.1.1 Bus Mode, Address and Data Pins
Separate BUSMD="L" D0-D7 D8-D15 A16-A23 A0-A7 A8-A15 General-purpose port Multiplex BUSMD="H" AD0-AD7 AD8-AD15/A8-A15 A0-A7/A16-A23 General-purpose port General-purpose port ALE
Port 0 (P00 to P07) Port 1 (P10 to P17) Port 2 (P20 to P27) Port 5 (P50 to P57) Port 6 (P60 to P67) Port 37 (P37)
Each port is put into input mode after a reset. To access an external device, set the address and data bus functions by using the port control register (PnCR) and the port function register (PnFC). In the multiplex mode, the four types of functions can be selected, as shown in Table 8.1.2, by setting the port registers (PnCR and PnFC). Table 8.1.2 Address and Data Pins in the Multiplex Mode
Number of address buses Number of data buses Number of address/data multiplexed buses Port 0 Port function Port 1 Port 2 max.24 (-16 MB) 8 8 AD0 to AD7 A8 to A15 A16 to A23 max.24 (-16 MB) 16 16 AD0 to AD7 AD8 to AD15 A16 to A23 max.16 (-64 KB) 8 0 AD0 to AD7 A8 to A15 A0 to A7 max.8 (-256 B) 16 0 AD0 to AD7 AD8 to AD15 A0 to A7
A23-8
A23-8
A23-16
A23-16 A15 -0 D15 -0
A15-0 AD7-0
A15-0 (Note 1)
A7-0
A7-0 (Note1) A15 D15 -0 -0
Timing Diagram
AD7-0
A7-0
D7-0
AD15-0
A7-0
D7-0
AD15-0
ALE
ALE
ALE
ALE
RD
RD
RD
RD
(Note 1) Even in cases of buses.
and
, address outputs are available as the data bus pins are also used for address
(Note 2) Ports 0 to 2 are put into input modes after a reset, and they do not serve as address or data bus pins. (Note 3) Any of to can be selected by setting the P1CR, P1FC, P2CR and P2FC registers.
TMP19A64 (rev1.1) 8-2
TMP19A64C1D
(2) Address HOLD when an internal area is accessed When an internal area is being accessed, the address bus maintains the address output of the previously accessed external area and doesn't change it. Also, the data bus is in a state of high impedance.
8.2 Data Format
Internal registers and external bus interfaces of the TMP19A64 are configured as described below. (1) Big-endian mode Word access * 16-bit bus width Internal registers
address x0 x1 x2 x3
External buses
D31 AA BB CC D00 DD
AABB MS LS A1=0
CCDD A1=1
*
8-bit bus width Internal registers
address x0 x1 x2 x3
External buses
D31 AA BB CC D00 DD
AA x0
BB x1
CC x2
DD x3
Half word access * 16-bit bus width Internal registers
address D31 AA x0 D00 BB x1 address D31 CC x2 D00 DD x3 CCDD MS LS AABB MS LS
External buses
TMP19A64 (rev1.1) 8-3
TMP19A64C1D
*
8-bit bus width Internal registers
address D31 AA x0 D00 BB x1 A x0 B x1
External buses
Internal registers
address D31 CC x2 D00 DD x3
External buses
C x2
D x3
Byte access * 16-bit bus width Internal registers
address D31 AA MS D00 AA x0 address D31 MS D00 BB x1 address D31 CC MS D00 CC x2 address D31 MS D00 DD x3 DD LS LS BB LS LS
External buses
TMP19A64 (rev1.1) 8-4
TMP19A64C1D
*
8-bit bus width Internal registers
address D31 AA D00 AA x0 address D31 BB D00 BB x1 address D31 CC D00 CC x2 address D31 DD D00 DD x3
External buses
TMP19A64 (rev1.1) 8-5
TMP19A64C1D
(2) Little-endian mode Word access * 16-bit bus width Internal registers
address x3 x2 x1 x0
External buses
D31 DD CC BB D00 AA
LS
AABB MS A1=0
CCDD A1=1
*
8-bit bus width Internal registers
address x3 x2 x1 x0
External buses
D31 DD CC BB D00 AA
AA x0
BB x1
CC x2
DD x3
Half word access * 16-bit bus width Internal registers
address D31 BB x1 D00 AA x0 LS AABB MS
External buses
address D31 DD x3 D00 CC x2 CCDD LSB MSB
TMP19A64 (rev1.1) 8-6
TMP19A64C1D
*
8-bit bus width Internal registers
address D31 BB x1 D00 AA x0 AA x0 BB x1
External buses
Internal registers
address D31 DD x3 D00 CC x2
External buses
CC x2
DD x3
Byte access * 16-bit bus width Internal registers
address D31 AA LSB D00 AA x0 address D31 LSB D00 BB x1 address D31 CC LSB D00 CC x2 address D31 LSB D00 DD x3 DD MSB MSB BB MSB MSB
External buses
TMP19A64 (rev1.1) 8-7
TMP19A64C1D
*
8-bit bus width Internal registers
address D31 AA D00 AA x0 address D31 BB D00 BB x1 address D31 CC D00 CC x2 address D31 DD D00 DD x3
External buses
TMP19A64 (rev1.1) 8-8
TMP19A64C1D
8.3 External Bus Operations (Separate Bus Mode)
This section describes various bus timing values. The timing diagram shown below assumes that the address buses are A23 through A0 and that the data buses are D15 through D0. (1) Basic bus operation The external bus cycle of the TMP19A64 basically consists of three clock pulses and a wait can be inserted as mentioned later. The basic clock of an external bus cycle is the same as the internal system clock. Fig. 8.3.1 shows read bus timing and Fig. 8.3.2 shows write bus timing. If internal areas are accessed, address buses remain unchanged as shown in these figures. Additionally, data buses are in a state of high impedance and control signals such as RD and WR do not become active.
tsys CSn A [23:0] D [15:0] DATA Address HOLD Output High - Z
RD
External access
No output of RD
Internal access
Fig. 8.3.1 Read Operation Timing Diagram
tsys CSn A [23:0] D [15:0] DATA Address HOLD Output High - Z
WR
External access
No output of WR Internal access
Fig. 8.3.2 Write Operation Timing Diagram
TMP19A64 (rev1.1) 8-9
TMP19A64C1D
(2) Wait timing A wait cycle can be inserted for each block by using the chip selector (CS) and wait controller. The following three types of wait can be inserted: A wait of up to 7 clocks can be automatically inserted. A wait can be inserted via the WAIT pin (2+2N, 3+2N, 4+2N, 5+2N, 6+2N, 7+2N). Note: 2N is the number of external waits that can be inserted. A wait can be inserted via the RDY pin (2+2N, 3+2N, 4+2N, 5+2N, 6+2N, 7+2N). Note: 2N is the number of external waits that can be inserted. The setting of the number of waits to be automatically inserted and the setting of the external wait input can be made using the chip selector and wait controller registers, BmnCS.
Fig. 8.3.3 through Fig. 8.3.10 show the timing diagrams in which waits have been inserted.
tsys
A[23:0] D[15:0] RD
address data
address data
0 wait
1 wait
Fig. 8.3.3 Read Operation Timing Diagram (0 Wait and 1 Wait Automatically Inserted)
tsys
A[23:0] D[15:0] RD
address data
5 wait
Fig. 8.3.4 Read Operation Timing Diagram (5 Waits Automatically Inserted)
TMP19A64 (rev1.1) 8-10
TMP19A64C1D
Fig. 8.3.5 shows the read operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the separate bus mode.
tsys fsys 0 wait A[23:0] D[15:0] /RD /WAIT 2 waits automatically inserted A[23:0] D[15:0] /RD /WAIT
2 waits automatically inserted
2 waits automatically inserted + 2N (N=1) A[23:0] D[15:0] /RD /WAIT
2 waits automatically inserted
2N_WAIT
3 waits automatically inserted + 2N (N=1) A[23:0] D[15:0] /RD /WAIT
3 waits automatically inserted
2N_WAIT
2 waits automatically inserted + 2N (N=2) A[23:0] D[15:0] /RD /WAIT
2 waits automatically inserted
2N_WAIT
--- External wait sampling point External wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2N_wait cycle is finished as shown above. The same applies to combinations of other numbers of waits.
Fig. 8.3.5 Read Operation Timing Diagram
TMP19A64 (rev1.1) 8-11
TMP19A64C1D
Fig. 8.3.6 shows the write operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the separate bus mode.
tsys
fsys 0 wait A[23:0] D[15:0] /WR /WAIT 2 waits automatically inserted A[23:0] D[15:0] /WR /WAIT
2 waits automatically inserted
2 waits automatically inserted + 2N (N=1) A[23:0] D[15:0] /WR /WAIT
3 waits automatically inserted + 2N (N=1) A[23:0] D[15:0] /WR /WAIT
2 waits automatically inserted
2N_WAIT
3 waits automatically inserted
2N_WAIT
2 waits automatically inserted + 2N (N=2) A[23:0] D[15:0] /WR /WAIT
2 waits automatically inserted 2N_WAIT
--- External wait sampling point External wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2N_wait cycle is finished as shown above. The same applies to combinations of other numbers of waits.
Fig. 8.3.6 Write Operation Timing Diagram
TMP19A64 (rev1.1) 8-12
TMP19A64C1D
By setting the bit 3 of port 3 function register P3FC to "1," the WAIT input pin (P33) can also serve as the RDY input pin. The RDY input is input to the external bus interface circuit as the logical reverse of the WAIT input. The number of waits is specified by the chip selector and wait controller register, BmnCS. Fig. 8.3.7 shows the RDY inputs and the number of waits.
tsys
fsys 2 waits automatically inserted A[23:0] D[15:0] /RD /RDY
2 waits automatically inserted
2 waits automatically inserted + 2N (N=1) A[23:0] D[15:0] /RD /RDY
2 waits automatically inserted 2N_WAIT
--- External RDY sampling point External RDY sampling points take place before a cycle of waits automatically inserted is finished and before a 2N_wait cycle is finished as shown above. The same applies to combinations of other numbers of waits.
Fig. 8.3.7 RDY Input and Wait Operation Timing Diagram
TMP19A64 (rev1.1) 8-13
TMP19A64C1D
(3) Time that it takes before ALE is asserted When the external bus of the TMP19A64 is used as a multiplexed bus, the ALE width (assert time) can be specified by using the system control register SYSCR3 in the CG. In the case of a separate bus mode, ALE is not output, but the time from when an address is established to the assertion of the RD or
WR signal is different depending on the SYSCR3.
During a reset, = "1" is set and the RD or WR signal is asserted as a point of two system (internal) clocks after an address is established. If is cleared to "0," the RD or WR signal is asserted at a point of one system (internal) clock after an address is established. This assert setting cannot be established for each block in an external area and the same setting is commonly used in an external address space.
tsys
A[23:0] D[15:0] RD
address data
address data
="0"
="1"
Fig. 8.3.13 SYSCR3 Set Value and External Bus Operation
TMP19A64 (rev1.1) 8-14
TMP19A64C1D
(4) Recovery time If access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. A dummy cycle can be inserted in both a read and a write cycle. The dummy cycle insertion setting can be made in the chip selector and wait controller registers, BmnCS (write recovery cycle) and (read recovery cycle). As for the number of dummy cycles, one or two system clocks (internal) can be specified for each block. Fig. 8.3.14 shows the timing of recovery time insertion.
tsys
CS A[23:0] RD WR No recovery cycle tsys address next address
CS A[23:0] RD WR 1 recovery cycle 2 recovery cycle address next address
Fig. 8.3.14 Timing of Recovery Time Insertion
TMP19A64 (rev1.1) 8-15
TMP19A64C1D
(5) Chip selector recovery time If access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. The dummy cycle insertion setting can be made in the chip selector and wait controller registers, BmnCS. As for the number of dummy cycles, one system clock (internal) can be specified for each block. Fig. 8.3.15 shows the timing of recovery time insertion.
tsys
CS A[23:0] RD WR No recovery cycle 1 recovery cycle address next address
TMP19A64 (rev1.1) 8-16
TMP19A64C1D
8.4 External Bus Operations (Multiplexed Bus Mode)
This section describes various bus timing values. The timing diagram shown below assumes that the address buses are A23 through A16 and that the address/data buses are AD15 through AD0. (1) Basic bus operation The external bus cycle of the TMP19A64 basically consists of three clock pulses and a wait can be inserted as mentioned later. The basic clock of an external bus cycle is the same as the internal system clock. Fig. 8.4.1 shows read bus timing and Fig. 8.4.2 shows write bus timing. If internal areas are accessed, address buses remain unchanged and the ALE does not output latch pulse as shown in these figures. Additionally, address/data buses are in a state of high impedance and control signals such as RD and WR do not become active.
tsys
CSn
A [23:16] AD [15:0] ALE DATA
Higher-order address HOLD Output Hi - Z ADR
No output of ALE No output of RD External access Internal access
RD
Fig. 8.4.1 Read Operation Timing Diagram
tsys
CSn
A [23:16] AD [15:0] ALE ADR DATA
Higher-order address
Output Hi - Z
No output of ALE
WR
External area
No output of WR Internal area
Fig. 8.4.2 Write Operation Timing Diagram
TMP19A64 (rev1.1) 8-17
TMP19A64C1D
(2) Wait Timing A wait cycle can be inserted for each block by using the chip selector (CS) and wait controller. The following three types of wait can be inserted: A wait of up to 7 clocks can be automatically inserted. A wait can be inserted via the WAIT pin (2+2N, 3+2N, 4+2N, 5+2N, 6+2N, 7+2N). Note: 2N is the number of external waits that can be inserted. A wait can be inserted via the RDY pin (2+2N, 3+2N, 4+2N, 5+2N, 6+2N, 7+2N). Note: 2N is the number of external waits that can be inserted. The setting of the number of waits to be automatically inserted and the setting of the external wait input can be made using the chip selector and wait controller registers, BmnCS.
TMP19A64 (rev1.1) 8-18
TMP19A64C1D
Fig. 8.4.3 shows the read operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the multiplexed bus mode.
tsys fsys
0 wait
A[23:16] AD[15:0] ALE /RD /WAIT
2 waits automatically inserted
Lower-order address
Higher-order address Data
A[23:16] AD[15:0] ALE /RD /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
2 waits automatically inserted + 2N (N=1)
A[23:16] AD[15:0] ALE /RD /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
3 waits automatically inserted + 2N (N=1)
2N_WAIT
A[23:16] AD[15:0] ALE /RD /WAIT
Lower-order address
Higher-order address Data
3 waits automatically inserted
2 waits automatically inserted + 2N (N=2)
2N_WAIT
A[23:16] AD[15:0] ALE /RD /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
2N_WAIT
--- External wait sampling point External wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2N_wait cycle is finished as shown above. The same applies to combinations of other numbers of waits.
Fig. 8.4.3 Read Operation Timing Diagram
TMP19A64 (rev1.1) 8-19
TMP19A64C1D
Fig. 8.4.4 shows the write operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the multiplexed bus mode.
tsys fsys
0 wait
A[23:16] AD[15:0] ALE /WR /WAIT
2 waits automatically inserted
Lower-order address
Higher-order address Data
A[23:16] AD[15:0] ALE /WR /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
2 waits automatically inserted + 2N (N=1)
A[23:16] AD[15:0] ALE /WR /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
3 waits automatically inserted + 2N (N=1)
2N_WAIT
A[23:16] AD[15:0] ALE /WR /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
2 waits automatically inserted + 2N (N=2)
2N_WAIT
A[23:16] AD[15:0] ALE /WR /WAIT
Lower-order address
Higher-order address Data
2 waits automatically inserted
2N_WAIT
--- External wait sampling point External wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2N_wait cycle is finished as shown above. The same applies to combinations of other numbers of waits.
Fig. 8.4.4 Write Operation Timing Diagram
TMP19A64 (rev1.1) 8-20
TMP19A64C1D
(3) Time that it takes before ALE is asserted Either 1 clock or 2 clocks can be selected as the time that it takes before ALE is asserted. The setting bit is located in the system clock control register. The default is 2 clocks. This assert setting cannot be established for each block in an external area and the same setting is commonly used in an external address space.
tsys
ALE (ALESEL = 0) 1 clock AD [15:0]
(ALESEL = 1) 2 clocks AD [15:0]
Fig. 8.4.12 Time That It Takes Before ALE Is Asserted
Fig. 8.4.13 shows the timing when the ALE is 1 clock or 2 clocks.
When the ALE is 1 clock or 2 clocks
tsys fsys
A[23:16] AD[15:0] ALE /RD
Higher-order address Lower-order address Data
Higher-order address Data
Fig. 8.4.13 Read Operation Timing Diagram (When the ALE is 1 Clock or 2 Clocks)
TMP19A64 (rev1.1) 8-21
TMP19A64C1D
(4) Read and Write Recovery Time If access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. A dummy cycle can be inserted in both a read and a write cycle. The dummy cycle insertion setting can be made in the chip selector and wait controller registers, BmnCS (write recovery cycle) and (read recovery cycle). As for the number of dummy cycles, one or two system clocks (internal) can be specified for each block. Fig. 8.4.14 shows the timing of recovery time insertion.
When read/write recovery is inserted (ALE width:1fsys)
tsys fsys A[23:16] AD[15:0] ALE /CS /RD,/WR Dummy cycle Normal cycle 1 recovery cycle 2 recovery cycles Dummy cycle
Higher-order address Lower-order address Data Higher-order address Lower-order address Data Higher-order address Lower-order address Data
Fig. 8.4.14 Timing of Recovery Time Insertion
TMP19A64 (rev1.1) 8-22
TMP19A64C1D
(5) Chip selector recovery time If access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. The dummy cycle insertion setting can be made in the chip selector and wait controller registers, BmnCS. As for the number of dummy cycles, one system clock (internal) can be specified for each block. Fig. 8.4.15 shows the timing of recovery time insertion.
When chip selector recovery is inserted (ALE width:1fsys) tsys fsys A[23:16] AD[15:0] ALE /CS /RD,/WR
Lower-order address
Higher-order address Data Lower-order address
Higher-order address Data
Dummy cycle Normal cycle Chip selector recovery cycle
TMP19A64 (rev1.1) 8-23
TMP19A64C1D
8.5 Bus Arbitration
The TMP19A64 can be connected to an external bus master. The arbitration of bus control authority with the external bus master is executed by using the two signals, BUSRQ and BUSAK . The external bus master can acquire control authority for TMP19A64 external buses only, and cannot acquire control authority for internal buses. (1) Accessible range of external bus master The external bus master can acquire control authority for TMP19A64 external buses only, and cannot acquire control authority for internal buses (G-BUS). Therefore, the external bus master cannot access the internal memories or the internal I/O. The arbitration of bus control authority for external buses is executed by the external bus interface circuit (EBIF), and this is independent of the CPU and the internal DMAC. Even when the external bus master holds the external bus control authority, the CPU and the internal DMAC can access the internal ROM, RAM and registers. On the other hand, if the CPU or the internal DMAC tries to access an external memory when the external bus master holds the external bus control authority, the CPU or the internal DMAC has to wait until the external bus master releases the bus. For this reason, if the BUSRQ remains active, the TMP19A64 can lock.
(2) Acquisition of bus control authority The external bus master requests the TMP19A64 for bus control authority by asserting the BUSRQ signal. The TMP19A64 samples the BUSRQ signal at the break of external bus cycles on the internal buses (GBUS) and determines whether or not to give the bus control authority to the external bus master. When it gives the bus control authority to the external bus master, it asserts the BUSAK signal. At the same time, it makes address buses, data buses and bus control signals ( RD and WR ) in a state of high impedance. (The internal pull-up is enabled for the R/ W , HWR and CSx .) Depending on the relationship between the size of data to be loaded or stored and the external memory bus width, two or more bus cycles can occur in response to a single data transfer (bus sizing). In this case, the end of the last bus cycle is the break of external bus cycles. If access to external areas occurs consecutively on the TMP19A64, a dummy cycle can be inserted. Again, requests for buses are accepted at the break of external bus cycles on the internal buses (G-BUS). During a dummy cycle, the next external bus cycle is already started on the internal buses. Therefore, even if the
BUSRQ signal is asserted during a dummy cycle, the bus is not released until the next external bus cycle is
completed. Keep asserting the BUSRQ signal until the bus control authority is released. Fig. 8.5.1 shows the timing of acquiring bus control authority by the external bus master.
TMP19A64 (rev1.1) 8-24
TMP19A64C1D
tsys Internal address External address BUSRQ BUSAK
TMP19A64 external access
TMP19A64 external access
TMP19A64 external access
External bus master cycle
TMP19A64 external access
BUSRQ is at the "H" level.
The TMP19A64 recognizes that the BUSRQ is at the "L" level, and releases the bus at the end of the bus cycle. When the bus is completed, the TMP19A64 asserts BUSAK . The external bus master recognizes that the
BUSAK is at the "L" level, and acquires the bus control authority to start bus operations.
Fig. 8.5.1 Bus Control Authority Acquisition Timing
(3) Release of bus control authority The external bus master releases the bus control authority when it becomes unnecessary. If the external bus master no longer needs the bus control authority that it has held, it deasserts the
BUSRQ signal and returns the bus control authority to the TMP19A64.
Fig. 8.5.2 shows the timing of releasing unnecessary bus control authority.
tsys
Internal address External address BUSRQ BUSAK
TMP19A64 external access
TMP19A64 external access
TMP19A64 external access
External bus master cycle
TMP19A64 external access
The external bus master has the bus control authority. The external bus master deasserts the BUSRQ , as it no longer requires the bus control authority. The TMP19A64 recognizes that the BUSRQ is at the "H" level, and deasserts the BUSAK .
Fig. 8.5.2 Timing of Releasing Bus Control Authority
TMP19A64 (rev1.1) 8-25
TMP19A64C1D
9.
The Chip Selector and Wait Controller
The TMP19A64 can be connected to external devices (I/O devices, ROM and SRAM). 6-block address spaces (CS0 through CS5) can be established in the TMP19A64 and three parameters can be specified for each 4-block address and other address spaces: data bus width, the number of waits and the number of dummy cycles.
CS0 through CS5 (also used as P40 through P45) are the output pins corresponding to spaces CS0 through CS5. These pins generate chip selector signals (for ROM and SRAM) to each space when the CPU designates an address in which spaces CS0 through CS5 are selected. For chip selector signals to be generated, however, the port 4 controller register (P4CR) and the port 4 function register (P4FC) must be set appropriately. The specification of the spaces CS0 through CS5 is to be performed with a combination of base addresses (BAn, n=0 to 5) and mask addresses (MAn, n=0 to 5) using the base and mask address setting registers (BMA0 through BMA5). Meanwhile, master enable, data bus width, the number of waits and the number of dummy cycles for each address space are specified in the chip selector and wait controller registers (B01CS, B23CS, B45CS and BEXCS).
A bus wait request pin ( WAIT ) is provided as an input pin to control the status of these settings.
9.1 Specifying Address Spaces
Spaces CS0 through CS5 are specified using the base and mask address setting registers (BMA0 through BMA5). In each bus cycle, a comparison is made to see if each address on the bus is located in the space CS0 through CS5. If the result of a comparison is a match, it is considered that the designated CS space has been accessed and chip selector signals are output from pins CS0 through CS5 and the operations specified by the chip selector and wait controller registers (B01CS, B23CS and B45CS) are executed. (Refer to "9.2 The Chip Selector and Wait Controller.")
9.1.1
Base and Mask Address Setting Registers
Figures 9.1.1 to 3 show base and mask address setting registers. For base addresses (BA0 through BA5), a start address in the space CS0 through CS5 is specified. In each bus cycle, the chip selector and wait controller compare values in their registers with addresses and those addresses with address bits masked by the mask address (MA0 through MA5) are not compared. The size of an address space is determined by the mask address setting. (1) Base addresses Base address BAn specifies the higher-order 16 bits (A31 through A16) of the start address. The lower-order 16 bits (A15 to A0) of the start address are always set to "0." Therefore, the start address begins with 0x0000_0000H and increases in 64 kilobyte units. Fig. 9.1.4 shows the relationship between the start address and the BAn value. (2) Mask addresses Mask address (MAn) specifies which address bit value is to be compared. The address on the bus that corresponds to the bit for which "0" is written on the address mask MAn is to be included in address comparison to determine if the address is in the area of the CS0 to CS5 spaces. The bit for which "1" is written is not included in address comparison.
TMP19A64 (rev1.1) 9-1
TMP19A64C1D
CS0 to CS5 spaces have different address bits that can be masked by MA0 to MA5. CS0 space and CS1 space: A29 through A14 CS2 space and CS3 space: A30 through A15 CS4 space and CS5 space: A30 through A15
(Note)
Address settings must be made using physical addresses.
TMP19A64 (rev1.1) 9-2
TMP19A64C1D
Base and mask address setting registers BMA0 (0xFFFF_E400H)-BMA5 (0xFFFF_E414H)
31 BMA0 bit Symbol (0xFFFF_E400H) Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function 30 29 28 BA0 R/W 0 23 0 22 0 0 0 0 A31 to A24 to be set as a start address 21 20 BA0 R/W 0 15 0 14 0 0 0 0 A23 to A16 to be set as a start address 13 12 MA0 R/W 0 7 0 6 0 0 Make sure that you write "0." 5 4 MA0 R/W 1 1 1 1 1 1 CS0 space size setting 0: Address for comparison 29 28 BA1 R/W 0 23 bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function 0 22 0 0 0 0 A31 to A24 to be set as a start address 21 20 BA1 R/W 0 15 0 14 0 0 0 0 A23 to A16 to be set as a start address 13 12 MA1 R/W 0 7 0 6 0 0 Make sure that you write "0." 5 4 MA1 R/W 1 1 1 1 1 1 CS1 space size setting 0: Address for comparison 1 1 0 3 0 2 1 1 1 0 11 10 0 9 0 8 19 18 0 17 0 16 27 26 1 1 0 3 0 2 1 1 1 0 11 10 0 9 0 8 19 18 0 17 0 16 27 26 25 24
31 BMA1 bit Symbol (0xFFFF_E404H) Read/Write After reset Function
30
25
24
(Note)
Make sure that you write "0" for bits 10 through 15 for BMA0 and BMA1. The size of both the CS0 and CS1 spaces can be a minimum of 16 KB to a maximum of 1 GB. The external address space of the TMP19A64 is 16 MB and so bits 10 through 15 must be set to "0" as addresses A24 through A29 are not masked. Fig. 9.1.1 Base and Mask Address Setting Registers (BMA0, BMA1)
TMP19A64 (rev1.1) 9-3
TMP19A64C1D
31 BMA2 bit Symbol (0xFFFF_E408H) Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
30
29
28 BA2 R/W
27
26
25
24
0 23
0 22
0 0 0 0 A31 to A24 to be set as a start address 21 20 BA2 R/W 19 18
0 17
0 16
0 15
0 14
0 0 0 0 A23 to A16 to be set as a start address 13 12 MA2 R/W 11 10
0 9
0 8
0 7
0 6
0 0 0 Make sure that you write "0." 5 4 MA2 R/W 3
0 2
0 1
1 0
1
1
1 1 1 1 CS2 space size setting 0: Address for comparison 29 28 BA3 R/W 27 26
1
1
31 BMA3 bit Symbol (0xFFFF_E40CH) Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
30
25
24
0 23
0 22
0 0 0 0 A31 to A24 to be set as a start address 21 20 BA3 R/W 19 18
0 17
0 16
0 15
0 14
0 0 0 0 A23 to A16 to be set as a start address 13 12 MA3 R/W 11 10
0 9
0 8
0 7
0 6
0 0 0 Make sure that you write "0." 5 4 MA3 R/W 3
0 2
0 1
1 0
1
1
1 1 1 1 CS3 space size setting 0: Address for comparison
1
1
(Note)
Make sure that you write "0" for bits 9 through 15 for BMA2 and BMA3. The size of both the CS2 and CS3 spaces can be a minimum of 32 KB to a maximum of 2 GB. The external address space of the TMP19A64 is 16 MB and so bits 9 through 15 must be set to "0" as addresses A24 through A30 are not masked. Fig. 9.1.2 Base and Mask Address Setting Registers (BMA2, BMA3)
TMP19A64 (rev1.1) 9-4
TMP19A64C1D
31 BMA4 bit Symbol (0xFFFF_E410H) Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
30
29
28 BA4 R/W
27
26
25
24
0 23
0 22
0 0 0 0 A31 to A24 to be set as a start address 21 20 BA4 R/W 19 18
0 17
0 16
0 15
0 14
0 0 0 0 A23 to A16 to be set as a start address 13 12 MA4 R/W 11 10
0 9
0 8
0 7
0 6
0 0 0 Make sure that you write "0." 5 4 MA4 R/W 3
0 2
0 1
1 0
1
1
1 1 1 1 CS4 space size setting 0: Address for comparison 29 28 BA5 R/W 27 26
1
1
31 BMA5 bit Symbol (0xFFFF_E414H) Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
30
25
24
0 23
0 22
0 0 0 0 A31 to A24 to be set as a start address 21 20 BA5 R/W 19 18
0 17
0 16
0 15
0 14
0 0 0 0 A23 to A16 to be set as a start address 13 12 MA5 R/W 11 10
0 9
0 8
0 7
0 6
0 0 0 Make sure that you write "0." 5 4 MA5 R/W 3
0 2
0 1
1 0
1
1
1 1 1 1 CS5 space size setting 0: Address for comparison
1
1
(Note)
Make sure that you write "0" for bits 9 through 15 for BMA4 and BMA5. The size of both the CS4 and CS5 spaces can be a minimum of 32 KB to a maximum of 2 GB. The external address space of the TMP19A64 is 16 MB and so bits 9 through 15 must be set to "0" as addresses A24 through A30 are not masked. Fig. 9.1.3 Base and Mask Address Setting Registers (BMA4, BMA5)
TMP19A64 (rev1.1) 9-5
TMP19A64C1D
Address 0xFFFF_FFFFH Start address Base address value (BAn) FFFFH
0xFFFF_0000H
0x0006_0000H 0x0005_0000H 0x0004_0000H 0x0003_0000H 0x0002_0000H 0x0001_0000H 0x0000_0000H 64 KB 0x0000_0000H
0006H 0005H 0004H 0003H 0002H 0001H 0000H
Fig. 9.1.4 Start and Base Address Register Values
9.1.2
*
How to Define Start Addresses and Address Spaces
To specify a space of 64 KB starting at 0xC000_0000 in the CS0 space, the base and mask address registers must be programmed as shown below.
31 BA0
16 15 MA0
0
11000000000000000000000000000011 C 0 0 0 0 0 0 3
Values to be set in the base and mask address registers (BMA0)
In the base address (BA0), specify "0xC000" that corresponds to higher 16 bits of a start address, while in the mask address (MA0), specify whether a comparison of addresses in the space A29 through A16 is to be made or not. To ensure a comparison of A29 through A16, set bits 15 to 2 of the mask address (MA0) to "0." A comparison of addresses of A31 and A30 will definitely be made. This setting allows A31 through A16 to be compared with the value specified as a start address. As A15 through A0 are masked, a space of 64 KB from 0xC000_0000 to 0xC000_FFFF is designated as a CS0 space and the CSO signal is asserted if there is a match with an address on the bus.
TMP19A64 (rev1.1) 9-6
TMP19A64C1D
*
To specify a space of 1 MB starting at 0x1FD0_0000 in the CS2 space, the base and mask address registers must be programmed as shown below.
31 BA2
16 15 MA2
0
00011111110100000000000000011111 1 F D 0 0 0 1 F
Values to be set in the base and mask address registers (BMA2)
In the base address (BA2), specify "0x1FD0" that corresponds to higher 16 bits of a start address, while in the mask address (MA2), specify whether a comparison of addresses in the space A30 through A15 is to be made or not. To ensure a comparison of A30 through A20, set bits 15 to 5 of the mask address (MA2) to "0." A comparison of A31 will definitely be made. This setting allows A31 through A20 to be compared with the value specified as a start address. As A19 through A0 are masked, a space of 1 MB from 0x1FD0_0000 to 0x1FDF_FFFF is designated as a CS2 space.
Note:
The CSn signal is not asserted to the following address spaces in the TMP19A64: 0x1FC0_0000 to 0x1FCF_FFFF 0x4000_0000 to 0x400F_FFFF 0xFFFD_6000 to 0xFFFD_FFFF, 0xFFFF_6000 to 0xFFFF_DFFF
After a reset, the CS0, CS1, and CS3 through CS5 spaces are disabled, while the whole CS2 space (4 GB) is enabled as an address space.
TMP19A64 (rev1.1) 9-7
TMP19A64C1D
Table 9.1.1 shows the relationship between CS space and space sizes. If two or more address spaces are specified simultaneously, a space or spaces with a smaller space number will be given priority in space selection.
Example: 0xC000_0000 as a start address of the CS0 space with a space size of 16 KB 0xC000_0000 as a start address of the CS1 space with a space size of 64 KB
CS0 space
CS1 space 0xC000_FFFF
0xC000_3FFF 0xC000_0000
0xC000_3FFF If a space of 0xC000_0000 to 0xC000_0000
0xC000_3FFF is accessed, the CS0 space is selected.
Table 9.1.1 CS Space and Space Sizes
Size (bytes) 16 K CS space CS0 CS1 CS2 CS3 CS4 CS5 32 K 64 K 128 K 256 K 512 K 1M 2M 4M 8M 16 M
TMP19A64 (rev1.1) 9-8
TMP19A64C1D
9.2 The Chip Selector and Wait Controller
Fig. 9.2.1 to Fig. 9.2.4 show the chip selector and wait controller registers. For each address space (spaces CS0 through CS5 and other address spaces), each chip selector and wait controller register (B01CS through B45CS, BEXCS) can be programmed to set master enable or disable, to select data bus width, to specify the number of waits and to insert dummy cycles. If two or more address spaces are specified simultaneously, a space or spaces with a smaller space number will be given priority in space selection (order of priority: CS0>CS1>CS2>CS3>CS4>CS5>EXCS).
TMP19A64 (rev1.1) 9-9
TMP19A64C1D
7 B01CS (FFFFE480H) bit Symbol Read/Write After reset Function B0OM R/W
6
5 R 0
4 B0BUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
3
2 B0W R/W
1
0
0 0 Select the chip selector output waveform. 00: ROM/RAM Do not make any other settings.
0 1 0 1 Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT (external WAIT input) 1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 11 B0E R/W R 0 10 9 B0RCV R/W 0 0 Specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 8
15 bit Symbol Read/Write After reset Function R 0
14 B0CSCV R/W 0 Specify the number of dummy cycles to be inserted. (CS0 recovery time) 1: 1 cycle 0: None 22 B1OM R/W
13 B0WCV R/W 0
12
0
Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited
0 Enable or disable CS0. 0: Disable 1: Enable
23 bit Symbol Read/Write After reset Function
21 R 0
20 B1BUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
19
18 B1W R/W
17
16
0 0 Select the chip selector output waveform. 00: ROM/RAM Do not make any other settings.
0
1
0
1
Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT
(external WAIT input)
1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 31 bit Symbol Read/Write After reset Function R 0 30 B1CSCV R/W 0 Specify the number of dummy cycles to be inserted. (CS1 recovery time) 1: 1 cycle 0: None 29 B1WCV R/W 0 0 Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 28 27 B1E R/W 0 Enable or disable CS1. 0: Disable 1: Enable R 0 26 25 B1RCV R/W 0 0 Specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 24
Fig. 9.2.1 Chip Selector and Wait Controller Registers
TMP19A64 (rev1.1) 9-10
TMP19A64C1D
7 B23CS bit Symbol (0xFFFF_E484H) Read/Write After reset Function B2OM R/W
6
5 R 0
4 B2BUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
3
2 B2W R/W
1
0
0 0 Select the chip selector output waveform. 00: ROM/RAM Do not make any other settings.
0 1 0 1 Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT (external WAIT input) 1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 11 B2E 1 Enable or disable CS2. 0: Disable 1: Enable 10 B2M 9 B2RCV 8
15 bit Symbol Read/Write After reset Function R 0
14 B2CSCV R/W 0 Specify the number of dummy cycles to be inserted. (CS2 recovery time) 1: 1 cycle 0: None 22 B3OM R/W
13 B2WCV R/W
12
0 0 Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited
R/W 0 0 0 Select CS2 Specify the number of space. dummy cycles to be 0: 4G space inserted. 1: CS space (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited
23 bit Symbol Read/Write After reset Function
21 R 0
20 B3BUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
19
18 B3W R/W
17
16
0 0 Select the chip select output waveform. 00: ROM/RAM Do not make any other settings.
0 1 0 1 Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT (external WAIT input) 1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 27 B3E R/W 0 Enable or disable CS3. 0: Disable 1: Enable 26 R 0 25 B3RCV R/W 0 0 Specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 24
31 bit Symbol Read/Write After reset Function R 0
30 B3CSCV R/W 0 Specify the number of dummy cycles to be inserted. (CS3 recovery time) 1: 1 cycle 0: None
29 B3WCV R/W
28
0 0 Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited
Fig. 9.2.2 Chip Selector and Wait Controller Registers
TMP19A64 (rev1.1) 9-11
TMP19A64C1D
7 B45CS bit Symbol (0xFFFF_E488H) Read/Write After reset Function B4OM R/W
6
5 R 0
4 B4BUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
3
2 B4W R/W
1
0
0 0 Select the chip selector output waveform. 00: ROM/RAM Do not make any other settings.
0 1 0 1 Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT (external WAIT input) 1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 11 B4E R/W 1 Enable or disable CS4. 0: Disable 1: Enable 10 R 0 9 B4RCV R/W 0 0 Specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 8
15 bit Symbol Read/Write After reset Function R 0
14 B4CSCV R/W 0 Specify the number of dummy cycles to be inserted. (CS4 recovery time) 1: 1 cycle 0: None 22 B5OM R/W
13 B4WCV R/W
12
0 0 Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited
23 bit Symbol Read/Write After reset Function
21 R 0
20 B5BUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
19
18 B5W R/W
17
16
0 0 Select the chip select output waveform. 00: ROM/RAM Do not make any other settings.
0 1 0 1 Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT (external WAIT input) 1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 27 B5E R/W 0 Enable or disable CS5. 0: Disable 1: Enable 26 R 0 25 B5RCV R/W 0 0 Specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 24
31 bit Symbol Read/Write After reset Function R 0
30 B5CSCV R/W 0 Specify the number of dummy cycles to be inserted. (CS5 recovery time) 1: 1 cycle 0: None
29 B5WCV R/W
28
0 0 Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited
Fig. 9.2.3 Chip Selector and Wait Controller Registers
TMP19A64 (rev1.1) 9-12
TMP19A64C1D
7 BEXCS bit Symbol (0xFFFF_E48CH) Read/Write After reset Function BEXOM R/W
6
5 R 0
4 BEXBUS R/W 0 Select data bus width. 0: 16bit 1: 8bit
3
2 BEXW R/W
1
0
0 0 Select the chip selector output waveform. 00: ROM/RAM Do not make any other settings.
0 1 0 1 Specify the number of waits. (automatic WAIT insertion) 0000: 0WAIT 0001: 1WAIT 0010: 2WAIT 0011: 3WAIT 0100: 4WAIT 0101: 5WAIT 0110: 6WAIT 0111: 7WAIT (external WAIT input) 1010: (2+2N) WAIT 1011: (3+2N) WAIT 1100: (4+2N) WAIT 1101: (5+2N) WAIT 1110: (6+2N) WAIT 1111: (7+2N) WAIT 1000,1001: reserved 11 R/W 0 10 R 0 9 BEXRCV R/W 0 0 Specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 18 8
15 bit Symbol Read/Write After reset Function R 0
14 BECSCV R/W 0 Specify the number of dummy cycles to be inserted. 1: 1 cycle 0: None
13 BEXWCV R/W
12
0 0 Specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: None 11: Setting prohibited 21 R
23 bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
22
20
19
0 31
0 30 R
0 29
0 28
0 27 R/W 0
0 26
0 25 R 0
0 24
0
0
0
0
0
0
Fig. 9.2.4 Chip Selector and Wait Controller Registers
A reset of the TMP19A64 allows the port 4 controller register (P4CR) and the port 4 function register (P4FC) to be cleared to "0," and the CS signal output is disabled. To output the CS signals, set the corresponding bits to "1" at the P4FC and the P4CR in that order. The CS recovery time can be configured in any other areas than the CS setting areas, but CS signals will not be output.
TMP19A64 (rev1.1) 9-13
TMP19A64C1D
10. DMA Controller (DMAC)
The TMP19A64 has a built-in 8-channel DMA Controller (DMAC).
10.1 Features
The DMAC of the TMP19A64 has the following features: (1) DMA with 8 independent channels (2) Two types of requests for bus control authority: With and without snoop requests (3) Transfer requests: Internal requests (software initiated)/external requests (external interrupts, interrupt requests given by internal peripheral I/Os, and requests given by the DREQ pin) Requests given by the DREQ pin (CH2, 3): Level mode (memory memory) Edge mode (memory I/O, I/O to memory) (4) Transfer mode: Dual address mode (5) Transfer devices: Memory-to-memory, memory-to-I/O, I/O-to-memory (6) Device size: 32-bit memory (8 or 16 bits can be specified using the CS/WAIT controller); I/O of 8, 16 or 32 bits (7) Address changes: Increase, decrease, fixed, irregular increase, irregular decrease (8) Channel priority: Fixed (in ascending order of channel numbers) (9) Endian switchover function
TMP19A64(rev1.1)-10-1
TMP19A64C1D
10.2 Configuration
10.2.1 Internal Connections of the TMP19A64
Fig. 10.2.1 shows the internal connections with the DMAC in the TMP19A64.
DREQ [3 : 2] DACK [3 : 2]
Port F and J function control DACK [7 : 0]* Interrupt controller
TX19A processor core
INTDREQ [7 : 0]*
(external request)
External interrupt request Internal I/O interrupt request
Notification to release bus control authority
DMAC
BUSGNT *
Request for bus control authority Request to release bus control authority Notification of bus control authority ownership Control Address Data
BUSREQ * BUSREL *
HAVEIT *
(Note)
In Fig. 10.1, signals indicated by * are internal signals. Fig. 10.2.1 DMAC Connections in the TMP19A64 The DMAC has eight DMA channels. Each of these channels handles the data transfer request signal (INTDREQn) from the interrupt controller and the acknowledgment signal (DACKn) generated in response to INTDREQn, where "n" is a channel number from 0 to 7. External pins (DREQ2 and DREQ3) are internally wired to allow them to function as pins of the port F and J. To use them as pins of the port F and J, they must be selected by setting the function control register PFFC and PJFC to an appropriate setting. If both ports are set to use the DMAC function, the port F is given priority in using the DMAC function. Pins, DACK2 and DACK3, handle the data transfer request and acknowledge signal output supplied through external pins, DREQ2 and DREQ3. Channel 0 is given higher priority than channel 1, channel 1 higher priority than channel 2 and channel 2 higher priority than channel 3. Subsequent channels are given priority in the same manner. The TX19A processor core has a snoop function. Using the snoop function, the TX19A processor core opens the core's data bus to the DMAC, thus allowing the DMAC to access the internal ROM and RAM linked to the core. The DMAC is capable of determining whether or not to use this snoop function. For further information on the snoop function, refer to 10.2.3 "Snoop Function." Two types of bus control authority (SREQ and GREQ) are available to the DMAC and which type of control right to use depends on the use or nonuse of the snoop function. GREQ is a request for bus control authority if the DMAC does not use the snoop function, while SREQ is a request for bus control authority if the DMAC uses the snoop function. SREQ is given higher priority than GREQ.
TMP19A64(rev1.1)-10-2
TMP19A64C1D
10.2.2
DMAC Internal Blocks
Fig. 10.2.2 shows the internal blocks of the DMAC.
Channel 7 Channel 6 Channel 5 Channel 4 Channel 3 Channel 2 Channel 1 Channel 0 31 Source address register (SARx) Destination address register (DARx) Byte count register (BSRx) Channel control register (CCRx) Channel status register (CSRx) DMA transfer control register (DTCRx) (x0 through 7) DMA control register (DCR) Request select register (RSR) Data holding register (DHR) 0
Fig. 10.2.2 DMAC Internal Blocks
10.2.3
Snoop Function
The TX19A processor core has a snoop function. If the snoop function is activated, the TX19A processor core opens the core's data bus to the DMAC and suspends its own operation until the DMAC withdraws a request for bus control authority. If the snoop function is enabled, the DMAC can access the internal RAM and ROM and therefore designate the RAM or ROM as a source or destination. If the snoop function is not used, the DMAC cannot access the internal RAM or ROM. However, the G-Bus is opened to the DMAC. If the TX19A processor core attempts to access memory or the I/O by way of the G-Bus and if the DMAC does not accept a bus control release request, bus operations cannot be executed and, as a result, the pipeline stalls. (Note) If the snoop function is not used, the TX19A processor core does not open the data bus to the DMAC. If the data bus is closed and the internal RAM or ROM is designated as a DMAC source or destination, an acknowledgment signal will not be returned in response to a DMAC transfer bus cycle and, as a result, the bus will lock.
TMP19A64(rev1.1)-10-3
TMP19A64C1D
10.3 Registers
The DMAC has fifty-one 32-bit registers. Table 10.3.1 shows the register map of the DMAC. Table 10.3.1 DMAC Registers
Address 0xFFFF_E200 0xFFFF_E204 0xFFFF_E208 0xFFFF_E20C 0xFFFF_E210 0xFFFF_E218 0xFFFF_E220 0xFFFF_E224 0xFFFF_E228 0xFFFF_E22C 0xFFFF_E230 0xFFFF_E238 0xFFFF_E240 0xFFFF_E244 0xFFFF_E248 0xFFFF_E24C 0xFFFF_E250 0xFFFF_E258 0xFFFF_E260 0xFFFF_E264 0xFFFF_E268 0xFFFF_E26C 0xFFFF_E270 0xFFFF_E278 0xFFFF_E280 0xFFFF_E284 0xFFFF_E288 0xFFFF_E28C 0xFFFF_E290 0xFFFF_E298 0xFFFF_E2A0 0xFFFF_E2A4 0xFFFF_E2A8 0xFFFF_E2AC 0xFFFF_E2B0 0xFFFF_E2B8 0xFFFF_E2C0 0xFFFF_E2C4 0xFFFF_E2C8 0xFFFF_E2CC 0xFFFF_E2D0 0xFFFF_E2D8 Register symbol CCR0 CSR0 SAR0 DAR0 BCR0 DTCR0 CCR1 CSR1 SAR1 DAR1 BCR1 DTCR1 CCR2 CSR2 SAR2 DAR2 BCR2 DTCR2 CCR3 CSR3 SAR3 DAR3 BCR3 DTCR3 CCR4 CSR4 SAR4 DAR4 BCR4 DTCR4 CCR5 CSR5 SAR5 DAR5 BCR5 DTCR5 CCR6 CSR6 SAR6 DAR6 BCR6 DTCR6 Register name Channel control register (ch. 0) Channel status register (ch. 0) Source address register (ch. 0) Destination address register (ch. 0) Byte count register (ch. 0) DMA transfer control register (ch. 0) Channel control register (ch. 1) Channel status register (ch. 1) Source address register (ch. 1) Destination address register (ch. 1) Byte count register (ch. 1) DMA transfer control register (ch. 1) Channel control register (ch. 2) Channel status register (ch. 2) Source address register (ch. 2) Destination address register (ch. 2) Byte count register (ch. 2) DMA transfer control register (ch. 2) Channel control register (ch. 3) Channel status register (ch. 3) Source address register (ch. 3) Destination address register (ch. 3) Byte count register (ch. 3) DMA transfer control register (ch. 3) Channel control register (ch. 4) Channel status register (ch. 4) Source address register (ch. 4) Destination address register (ch. 4) Byte count register (ch. 4) DMA transfer control register (ch. 4) Channel control register (ch. 5) Channel status register (ch. 5) Source address register (ch. 5) Destination address register (ch. 5) Byte count register (ch. 5) DMA transfer control register (ch. 5) Channel control register (ch. 6) Channel status register (ch. 6) Source address register (ch. 6) Destination address register (ch. 6) Byte count register (ch. 6) DMA transfer control register (ch. 6)
TMP19A64(rev1.1)-10-4
TMP19A64C1D
Table 10.3.1 DMAC Registers (2)
0xFFFF_E2E0 0xFFFF_E2E4 0xFFFF_E2E8 0xFFFF_E2EC 0xFFFF_E2F0 0xFFFF_E2F8 0xFFFF_E300 0xFFFF_E304 0xFFFF_E30C CCR7 CSR7 SAR7 DAR7 BCR7 DTCR7 DCR RSR DHR Channel control register (ch. 7) Channel status register (ch. 7) Source address register (ch. 7) Destination address register (ch. 7) Byte count register (ch. 7) DMA transfer control register (ch. 7) DMA control register (DMAC) Request select register (DMAC) Data holding register (DMAC)
TMP19A64(rev1.1)-10-5
TMP19A64C1D
10.3.1
DMA Control Register (DCR)
7 6 Rst6 0 14 5 Rst5 0 13 4 Rst4 3 Rst3 2 Rst2 0 10 1 Rst1 0 9 0 Rst0 0 8
DCR
bit Symbol (0xFFFF_E300H) Read/Write
After reset Function
Rst7 0 15
W 0 0 See detailed description. 12 11 R 0
bit Symbol Read/Write
After reset Function 23 bit Symbol Read/Write After reset Function 31 30 29 28 22 21 20
19 R 0 27 R 0
18
17
16
26
25
24
bit Symbol
Read/Write After reset Function
Rstall W 0
See detailed description.
Bit 31
Mnemonic Rstall
Field name Reset all
Description Performs a software reset of the DMAC. If the Rstall bit is set to 1, the values of all the internal registers of the DMAC are reset to their initial values. All transfer requests are canceled and all eight channels go into an idle state. 0: Don't care 1: Initializes the DMAC Performs a software reset of the DMAC channel 7. If the Rst7 bit is set to 1, internal registers of the DMAC channel 7 and a corresponding bit of the channel 7 of the RSR register are reset to their initial values. The transfer request of the channel 7 is canceled and the channel 7 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 7 Performs a software reset of the DMAC channel 6. If the Rst6 bit is set to 1, internal registers of the DMAC channel 6 and a corresponding bit of the channel 6 of the RSR register are reset to their initial values. The transfer request of the channel 6 is canceled and the channel 6 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 6 Performs a software reset of the DMAC channel 5. If the Rst5 bit is set to 1, internal registers of the DMAC channel 5 and a corresponding bit of the channel 5 of the RSR register are reset to their initial values. The transfer request of the channel 5 is canceled and the channel 5 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 5
7
Rst7
Reset 7
6
Rst6
Reset 6
5
Rst5
Reset 5
Fig. 10.3.1 DMA Control Register (DCR) (1 of 2)
TMP19A64(rev1.1)-10-6
TMP19A64C1D
Bit 4
Mnemonic Rst4
Field name Reset 4
Description Performs a software reset of the DMAC channel 4. If the Rst4 bit is set to 1, internal registers of the DMAC channel 4 and a corresponding bit of the channel 4 of the RSR register are reset to their initial values. The transfer request of the channel 4 is canceled and the channel 4 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 4 Performs a software reset of the DMAC channel 3. If the Rst3 bit is set to 1, internal registers of the DMAC channel 3 and a corresponding bit of the channel 3 of the RSR register are reset to their initial values. The transfer request of the channel 3 is canceled and the channel 3 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 3 Performs a software reset of the DMAC channel 2. If the Rst2 bit is set to 1, internal registers of the DMAC channel 2 and a corresponding bit of the channel 2 of the RSR register are reset to their initial values. The transfer request of the channel 2 is canceled and the channel 2 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 2 Performs a software reset of the DMAC channel 1. If the Rst1 bit is set to 1, internal registers of the DMAC channel 1 and a corresponding bit of the channel 1 of the RSR register are reset to their initial values. The transfer request of the channel 1 is canceled and the channel 1 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 1 Performs a software reset of the DMAC channel 0. If the Rst0 bit is set to 1, internal registers of the DMAC channel 0 and a corresponding bit of the channel 0 of the RSR register are reset to their initial values. The transfer request of the channel 0 is canceled and the channel 0 goes into an idle state. 0: Don't care 1: Initializes the DMAC channel 0
3
Rst3
Reset 3
2
Rst2
Reset 2
1
Rst1
Reset 1
0
Rst0
Reset 0
Fig. 10.3.1 DMA Control Register (DCR) (2 of 2) (Note 1) If a write to the DCR register occurs during a software reset right after the last round of DMA transfer is completed, the interrupt to stop DMA transfer is not canceled although the channel register is initialized. (Note 2) An attempt to execute a write (software reset) to the DCR register by DMA transfer must be strictly avoided.
TMP19A64(rev1.1)-10-7
TMP19A64C1D
10.3.2
Channel Control Registers (CCRn) (n=0 through 7)
7 SAC R/W 0 15 bit Symbol Read/Write After reset Function W 0 Always set this bit to "0." 23 NIEn R/W 1 See detailed description. 31 Str W 0
See detailed description.
CCRn (0xFFFF_E200H) (0xFFFF_E220H) (0xFFFF_E240H) (0xFFFF_E260H) (0xFFFF_E280H) (0xFFFF_E2A0H) (0xFFFF_E2C0H) (0xFFFF_E2E0H)
bit Symbol Read/Write After reset Function
6 DIO R/W 0 14 ExR R/W 0
5 DAC R/W 0 13 PosE R/W 0
4
3 TrSiz R/W
2
1 DPS R/W 0 9 SIO R/W 0
0
0 0 0 See detailed description. 12 11 10 Lev SReq RelEn R/W R/W R/W 0 0 0 See detailed description.
0 8 SAC R/W 0
bit Symbol Read/Write After reset Function
22 AblEn R/W 1
21 R/W 1
20
19
18 R/W 0
R/W R/W 0 0 Always set this bit to "0."
30
29
28
27
26
W 0 See Always set detailed this bit to description. "0." 25 24 W 0 Always set this bit to "0."
17 Big R/W 1
16
bit Symbol Read/Write After reset Function
0
0
0
0
0
0
Bit 31
Mnemonic Str
Field name Channel start
Description Start (initial value: 0) Starts channel operation. If this bit is set to 1, the channel goes into a standby mode and starts to transfer data in response to a transfer request. Only a write of 1 is valid to the Str bit and a write of 0 is ignored. A read always returns a 0. 1: Starts channel operation This is a reserved bit. Always set this bit to "0." Normal Completion Interrupt Enable (initial value: 1) 1: Normal completion interrupt enable 0: Normal completion interrupt disable Abnormal Completion Interrupt Enable (initial value: 1) 1: Abnormal completion interrupt enable 0: Abnormal completion interrupt disable This is a reserved bit. Although its initial value is "1," always set this bit to "0." This is a reserved bit. Always set this bit to "0." This is a reserved bit. Always set this bit to "0." This is a reserved bit. Always set this bit to "0."
24 23
NIEn
(Reserved) Normal completion interrupt enable Abnormal completion interrupt enable (Reserved) (Reserved) (Reserved) (Reserved)
22
AbIEn
21 20 19 18

Fig. 10.3.2 Channel Control Register (CCRn) (1 of 3)
TMP19A64(rev1.1)-10-8
TMP19A64C1D
Bit 17
Mnemonic Big
Field name Big-endian
Description Big Endian (initial value: 1) 1: A channel operates by big-endian 0: A channel operates by little-endian This is a reserved bit. Always set this bit to "0." This is a reserved bit. Always set this bit to "0."
16 15 14
ExR
(Reserved) (Reserved)
13
PosE
12
Lev
11
SReq
10
RelEn
9
SIO
External request mode External Request Mode (initial value: 0) Selects a transfer request mode. 1: External transfer request (interrupt request or external DREQn request) 0: Internal transfer request (software initiated) Positive edge Positive Edge (initial value: 0) The effective level of the transfer request signal INTDREQn or DREQn is specified. This function is valid only if the transfer request is an external transfer request (if the ExR bit is 1). If it is an internal transfer request (if the ExR bit is 0), the PosE value is ignored. Because the INTDREQn and DREQn signals are active at "L" level, make sure that this PosE bit is set to "0." 1: Setting prohibited 0: The falling edge of the INTDREQn or DREQn signal or the "L" level is effective. The DACKn is active at "L" level. Level mode Level Mode (initial value: 0) Specifies which is used to recognize the external transfer request, signal level or signal change. This setting is valid only if a transfer request is the external transfer request (if the ExR bit is 1). If the internal transfer request is specified as a transfer request (if the ExR bit is 0), the value of the Lev bit is ignored. Because the INTDREQn signal is active at "L" level, make sure that you set the Lev bit to "1." The state of active DREQn is determined by the Lev bit setting. 1: Level mode The level of the DREQn signal is recognized as a data transfer request. (The "L" level is recognized if the PosE bit is 0. 0: Edge mode A change in the DREQn signal is recognized as a data transfer request. (A falling edge is recognized if the PosE bit is 0.) Snoop request Snoop Request (initial value: 0) The use of the snoop function is specified by asserting the bus control request mode. If the snoop function is used, the snoop function of the TX19A processor core is enabled and the DMAC can use the data bus of the TX19A processor core. If the snoop function is not used, the snoop function of the TX19A processor core does not work. 1: Use snoop function (SREQ) 0: Do not use snoop function (GREQ) Release Request Enable (initial value: 0) Bus control release request enable Acknowledgment of the bus control release request made by the TX19A processor core is specified. This function is valid only if GREQ is generated. If SREQ is generated, the TX19A processor core cannot make a bus control release request and, therefore, this function cannot be used. 1: The bus control release request is acknowledged if the DMAC has control of the bus. If the TX19A processor core issues a bus control release request, the DMAC relinquishes control of the bus to the TX19A processor core during a pause in bus operation. 0: The bus control release request is not acknowledged. Source I/O Source Type: I/O (initial value: 0) Specifies the source device. 1: I/O device 0: Memory
Fig. 10.3.2 Channel Control Register (CCRn) (2/3)
TMP19A64(rev1.1)-10-9
TMP19A64C1D
Bit 8:7
Mnemonic SAC
Field name Source address count
Description Source Address Count (initial value: 00) Source Address Count (initial value: 00) Specifies the manner of change in a source address. 1x: Address fixed 01: Address decrease 00: Address increase Destination Type: I/O (initial value: 0) Specifies a destination device. 1: I/O device 0: Memory Destination Address Count (initial value: 00) Specifies the manner of change in a destination address. 1x: Address fixed 01: Address decrease 00: Address increase Transfer Size (initial value: 00) Specifies the amount of data to be transferred in response to one transfer request. 11: 8 bits (1 byte) 10: 16 bits (2 bytes) 0x: 32 bits (4 bytes) Device Port Size (initial value: 00) Specifies the bus width of an I/O device designated as a source or destination device. 11: 8 bits (1 byte) 10: 16 bits (2 bytes) 0x: 32 bits (4 bytes)
6
DIO
Destination I/O
5:4
DAC
Destination address count
3:2
TrSiz
Transfer unit
1:0
DPS
Device port size
Fig. 10.3.2 Channel Control Register (CCRn) (3/3) (Note 1) The CCRn register setting must be completed before the DMAC is put into a standby mode. (Note 2) When accessing the internal I/O or transferring data by DMA in response to the DREQ pin request, make sure that you set the transfer unit and the device port size to the same size. (Note 3) In executing memory-to-memory data transfer, a value set in DPS becomes invalid.
TMP19A64(rev1.1)-10-10
TMP19A64C1D
10.3.3
Request Select Register (RSR)
7 6 5 4 R/W 0 3 ReqS3 R/W 0 2 ReqS2 R/W 0 1 0
RSR (0xFFFF_E304H)
bit Symbol Read/Write After reset Function
R/W 0
R/W R/W 0 0 Always set this bit to "0." 14 13
See detailed description.
15 bit Symbol Read/Write After reset Function 23 bit Symbol Read/Write After reset Function 31 bit Symbol Read/Write After reset Function
12 R 0
11
10
R/W R/W 0 0 Always set this bit to "0." 9 8
22
21
20 R 0
19
18
17
16
30
29
28 R 0
27
26
25
24
Bit 3
Mnemonic ReqS3
Field name Request select (ch.3)
Description Request Select (initial value: 0) Selects a source of the external transfer request for the DMA channel 3. 1: Request made by DREQ3 0: Request made by the interrupt controller (INTC) Request Select (initial value: 0) Selects a source of the external transfer request for the DMA channel 2. 1: Request made by DREQ2 0: Request made by the interrupt controller (INTC)
2
ReqS2
Request select (ch.2)
Fig. 10.3.3 DMA Control Register (RSR) (Note) Make sure that you write "0" to bits 0, 1 and 4 through 7 of the RSR register.
TMP19A64(rev1.1)-10-11
TMP19A64C1D
10.3.4
Channel Status Registers (CSRn) (n=0 through 7)
7 6 5 R 0 15 bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function 23 NC R/W 0 22 AbC R/W 0 21 14 13 12 R 0 20 19 18 BES BED Conf R R R 0 0 0 See detailed description. 17 R 0 16 11 4 3 2 1 0
CSRn (0xFFFF_E204H) (0xFFFF_E224H) (0xFFFF_E244H) (0xFFFF_E264H) (0xFFFF_E284H) (0xFFFF_E2A4H) (0xFFFF_E2C4H) (0xFFFF_E2E4H)
bit Symbol Read/Write After reset Function
R/W R/W R/W 0 0 0 Always set this bit to "0." 10 9 8
bit Symbol Read/Write After reset Function
R/W 0 See detailed description. Always set this bit to "0." 31 30 29 Act R 0
See detailed description.
28
27 R 0
26
25
24
Bit 31
Mnemonic Act
Field name Channel active
Description Channel Active (initial value: 0) Indicates whether the channel is in a standby mode: 1: In a standby mode 0: Not in a standby mode Normal Completion (initial value: 0) Indicates normal completion of channel operation. If an interrupt at normal completion is permitted by the CCR register, the DMAC requests an interrupt when the NC bit becomes 1. This setting can be cleared by writing 0 to the NC bit. If a request for an interrupt at normal completion was previously issued, the request is canceled if the NC bit becomes 0. If an attempt is made to set the Str bit to 1 when the NC bit is 1, an error occurs. To start the next transfer, the NC bit must be cleared to 0. A write of 1 will be ignored. 1: Channel operation has been completed normally. 0: Channel operation has not been completed normally
23
NC
Normal completion
Fig. 10.3.4 Channel Status Registers (CSRn) (1/2)
TMP19A64(rev1.1)-10-12
TMP19A64C1D
Bit 22
Mnemonic AbC
Field name Abnormal completion
Description Abnormal Completion (initial value: 0) Indicates abnormal completion of channel operation. If an interrupt at abnormal completion is permitted by the CCR register, the DMAC requests an interrupt when the AbC bit becomes 1. This setting can be cleared by writing 0 to the AbC bit. If a request for an interrupt at abnormal completion was previously issued, the request is canceled if the AbC bit becomes 0. Additionally, if the AbC bit is cleared to 0, each of the BES, BED and Conf bits are cleared to 0. If an attempt is made to set the Str bit to 1 when the AbC bit is 1, an error occurs. To start the next transfer, the AbC bit must be cleared to 0. A write of 1 will be ignored. 1: Channel operation has been completed abnormally. 0: Channel operation has not been completed abnormally. This is a reserved bit. Always set this bit to "0." Source Bus Error (initial value: 0) 1: A bus error has occurred when the source was accessed. 0: A bus error has not occurred when the source was accessed. Destination Bus Error (initial value: 0) 1: A bus error has occurred when the destination was accessed. 0: A bus error has not occurred when the destination was accessed. Configuration Error (initial value: 0) 1: A configuration error has occurred. 0: A configuration error has not occurred. These three bits are reserved bits. Always set them to "0."
21 20
BES
(Reserved) Source bus error
19
BED
Destination bus error
18
Conf
Configuration error
2:0
(Reserved)
Fig. 10.3.4 Channel Status Registers (CSRn) (2/2)
TMP19A64(rev1.1)-10-13
TMP19A64C1D
10.3.5
Source Address Registers (SARn) (n=0 through 7)
7 SAddr7 6 SAddr6 5 SAddr5 4 SAddr4 3 SAddr3 2 SAddr2 1 SAddr1 0 SAddr0
SARn (0xFFFF_E208H) (0xFFFF_E228H) (0xFFFF_E248H) (0xFFFF_E268H) (0xFFFF_E288H) (0xFFFF_E2A8H) (0xFFFF_E2C8H) (0xFFFF_E2E8H)
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
15 SAddr15
14 SAddr14
13 SAddr13
23 SAddr23
22 SAddr22
21 SAddr21
31 SAddr31
30 SAddr30
29 SAddr29
R/W 0 See detailed description. 12 11 SAddr12 SAddr11 R/W 0 See detailed description. 20 19 SAddr20 SAddr19 R/W 0 See detailed description. 28 27 SAddr28 SAddr27 R/W 0 See detailed description.
10 SAddr10
9 SAddr9
8 SAddr8
18 SAddr18
17 SAddr17
16 SAddr16
26 SAddr26
25 SAddr25
24 SAddr24
Bit 31 : 0
Mnemonic SAddr
Field name Source address
Description Source Address (initial value: 0) Specifies the address of the source from which data is transferred using a physical address. This address changes according to the SAC and TrSiz settings of CCRn and the SACM setting of DTCRn.
Fig. 10.3.5 Source Address Register (SARn)
TMP19A64(rev1.1)-10-14
TMP19A64C1D
10.3.6
Destination Address Register (DARn) (n=0 through 7)
7 DAddr7 6 DAddr6 4 3 DAddr4 DAddr3 R/W 0 See detailed description. 13 12 11 DAddr13 DAddr12 DAddr11 R/W 0 See detailed description. 21 20 19 DAddr21 DAddr20 DAddr19 R/W 0 See detailed description. 29 28 27 DAddr29 DAddr28 DAddr27 R/W 0 See detailed description. 5 DAddr5 2 DAddr2 1 DAddr1 0 DAddr0
DARn (0xFFFF_E20CH) (0xFFFF_E22CH) (0xFFFF_E24CH) (0xFFFF_E26CH) (0xFFFF_E28CH) (0xFFFF_E2ACH) (0xFFFF_E2CCH) (0xFFFF_E2ECH)
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
15 DAddr15
14 DAddr14
10 DAddr10
9 DAddr9
8 DAddr8
23 DAddr23
22 DAddr22
18 DAddr18
17 DAddr17
16 DAddr16
31 DAddr31
30 DAddr30
26 DAddr26
25 DAddr25
24 DAddr24
Bit 31 : 0
Mnemonic DAddr
Field name Destination address
Description Destination Address (initial value: 0) Specifies the address of the destination to which data is transferred using a physical address. This address changes according to the DAC and TrSiz settings of CCRn and the DACM setting of DTCRn.
Fig. 10.3.6 Destination Address Register (DARn)
TMP19A64(rev1.1)-10-15
TMP19A64C1D
10.3.7
Byte Count Registers (BCRn) (n=0 through 7)
7 BC7 6 BC6 5 BC5 4 BC4 3 BC3 2 BC2 1 BC1 0 BC0
BCRn (0xFFFF_E210H) (0xFFFF_E230H) (0xFFFF_E250H) (0xFFFF_E270H) (0xFFFF_E290H) (0xFFFF_E2B0H) (0xFFFF_E2D0H) (0xFFFF_E2F0H)
bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
15 BC15
14 BC14
13 BC13
23 BC23
22 BC22
21 BC21
31
30
29
R/W 0 See detailed description. 12 11 BC12 BC11 R/W 0 See detailed description. 20 19 BC20 BC19 R/W 0 See detailed description. 28 27 R 0
10 BC10
9 BC9
8 BC8
18 BC18
17 BC17
16 BC16
26
25
24
Bit 23 : 0
Mnemonic BC
Field name Byte count
Description Byte Count (initial value: 0) Specifies the number of bytes of data to be transferred. The address decreases by the number of pieces of data transferred (a value specified by TrSiz of CCRn).
Fig. 10.3.7 Byte Count Register (BCRn)
TMP19A64(rev1.1)-10-16
TMP19A64C1D
10.3.8
DMA Transfer Control Register (DTCRn) (n=0 through 7)
7 6 R 0 15 bit Symbol Read/Write After reset Function 23 bit Symbol Read/Write After reset Function 31 bit Symbol Read/Write After reset Function 30 29 28 R 0 22 21 20 R 0 27 26 25 24 14 4 3 DACM R/W 0 0 0 See detailed description. 13 12 11 R 0 19 18 17 16 5 1 0 SACM R/W 0 0 0 See detailed description. 10 9 8 2
DTCRn (0xFFFF_E218H) (0xFFFF_E238H) (0xFFFF_E258H) (0xFFFF_E278H) (0xFFFF_E298H) (0xFFFF_E2B8H) (0xFFFF_E2D8H) (0xFFFF_E2F8H)
bit Symbol Read/Write After reset Function
Bit 5:3
Mnemonic DACM
Field name Destination address count mode
Description Destination Address Count Mode Specifies the count mode of the destination address. 000: Counting begins from bit 0 001: Counting begins from bit 4 010: Counting begins from bit 8 011: Counting begins from bit 12 100: Counting begins from bit 16 101: Setting prohibited 110: Setting prohibited 111: Setting prohibited Source Address Count Mode Specifies the count mode of the source address. 000: Counting begins from bit 0 001: Counting begins from bit 4 010: Counting begins from bit 8 011: Counting begins from bit 12 100: Counting begins from bit 16 101: Setting prohibited 110: Setting prohibited 111: Setting prohibited
2:0
SACM
Source address count mode
Fig. 10.3.8 DMA Transfer Control Register (DTCRn)
TMP19A64(rev1.1)-10-17
TMP19A64C1D
10.3.9
Data Holding Register (DHR)
7 DOT7 6 DOT6 5 DOT5 4 DOT4 3 DOT3 2 DOT2 1 DOT1 0 DOT0
DHR bit Symbol (0xFFFF_E30CH) Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function bit Symbol Read/Write After reset Function
15 DOT15
14 DOT14
13 DOT13
23 DOT23
22 DOT22
21 DOT21
31 DOT31
30 DOT30
29 DOT29
R/W 0 See detailed description. 12 11 DOT12 DOT11 R/W 0 See detailed description. 20 19 DOT20 DOT19 R/W 0 See detailed description. 28 27 DOT28 DOT27 R/W 0 See detailed description.
10 DOT10
9 DOT9
8 DOT8
18 DOT18
17 DOT17
16 DOT16
26 DOT26
25 DOT25
24 DOT24
Bit 31 : 0
Mnemonic DOT
Field name Data on transfer
Description Data on Transfer (initial value: 0) Data that is read from the source in a dual-address data transfer mode.
Fig. 10.3.9 Data Holding Register (DHR)
TMP19A64(rev1.1)-10-18
TMP19A64C1D
10.4 Functions
10.4.1 Overview
The DMAC is a 32-bit DMA controller capable of transferring data in a system using the TX19A processor core at high speeds without routing data via the core. (1) Source and destination The DMAC handles data transfers from memory to memory and between memory and an I/O device. A device from which data is transferred is called a source device and a device to which data is transferred is called a destination device. Both memory and I/O devices can be designated as a source or destination device. The DMAC supports data transfers from memory to I/O devices, from I/O devices to memory, and from memory to memory, but not between I/O devices. The differences between memory and I/O devices are in the way they are accessed. When accessing an I/O device, the DMAC asserts a DACKn signal. Because there is only one line per channel that carries a DACKn signal, the number of I/O devices accessible during data transfer is limited to one. Therefore, data cannot be transferred between I/O devices. An interrupt factor can be attached to a transfer request to be sent to the DMAC. If an interrupt factor is generated, the interrupt controller (INTC) issues a request to the DMAC (the TX19A processor core is not notified of the interrupt request. For details, see description on Interrupts.). The request issued by the INTC is cleared by the DACKn signal. Therefore, if an I/O device is designated as a device to which data is to be transferred, a request made to the DMAC is cleared after completion of the data transfer (transfer of the amount of data specified by TrSiz). On the other hand, during memory-to-memory transfers, the DACKn signal is asserted only when the number of bytes transferred (value set in the BCRn register) becomes "0." Therefore, one transfer request allows data to be transferred successively without a pause. For example, if data is transferred between a internal I/O and the internal (external) memory of the TMP19A64, a request made by the internal I/O to the DMAC is cleared after completion of each data transfer and the transfer operation is always put in a standby mode for the next transfer request if the number of bytes transferred (value set in the BCRn register) does not become "0." Therefore, the DMA transfer operation continues until the value of the BCRn register becomes "0." (2) Bus control arbitration (bus arbitration) In response to a transfer request made inside the DMAC, the DMAC requests the TX19A processor core to arbitrate bus control authority. When a response signal is returned from the core, the DMAC acquires bus control authority and executes a data transfer bus cycle. In acquiring bus control for the DMAC, use or nonuse of the data bus of the TX19A processor core can be specified; specifically either snoop mode or non-snoop mode can be specified for each channel by using bit 11 (SReq) of the CCRn register. There are cases in which the TX19A processor core requests the release of bus control authority. Whether or not to respond to this request can be specified for each channel by using the bit 10 (RelEn) of the CCRn register. However, this function can only be used in non-snoop mode (GREQ). In snoop mode (SREQ), the TX19A processor core cannot request the release of bus control and, therefore, this function cannot be used. When there are no more transfer requests, the DMAC releases control of the bus.
TMP19A64(rev1.1)-10-19
TMP19A64C1D
(Note 1) When the DMAC is acquiring bus control authority, NMI is put on hold. (Note 2) Do not bring the TX19A to a halt when the DMAC is in operation. (Note 3) To put the TX19A into IDLE (doze) mode when the snoop function is being used, you must first stop the DMAC.
TMP19A64(rev1.1)-10-20
TMP19A64C1D
(3) Transfer request modes Two transfer request modes are used for the DMAC: an internal transfer request mode and an external transfer request mode. In the internal transfer request mode, a transfer request is generated inside the DMAC. Setting a start bit (Str bit of the channel control register CCRn) in the internal register of the DMAC to "1" generates a transfer request, and the DMAC starts to transfer data. In the external transfer request mode, after a start bit is set to "1," a transfer request is generated when a transfer request signal INTDREQn output by the INTC is input, or when a transfer request signal DREQn output by an external device is input. For the DMAC, two modes are provided: the level mode in which a transfer request is generated when the "L" level of the INTDREQn signal is detected and a mode in which a transfer request is generated when the falling edge or "L" level of the DREQn signal is detected. (4) Address mode For the DMAC of the TMP19A64, only one address mode is provided: a dual address mode. A single address mode is not available. In the dual address mode, data can be transferred from memory to memory and between memory and an I/O device. Source and destination device addresses are output by the DMAC. To access an I/O device, the DMAC asserts the DACKn signal. In the dual address mode, two bus operations, a read and a write, are executed. Data that is read from a source device for transfer is first put into the data holding register (DHR) inside the DMAC and then written to a destination device. (5) Channel operation The DMAC has eight channels (channels 0 through 7). A channel is activated and put into a standby mode by setting a start (Str) bit in the channel control register (CCRn) to "1." If a transfer request is generated when a channel is in a standby mode, the DMAC acquires bus control authority and transfers data. If there is no transfer request, the DMAC releases bus control authority and goes into a standby mode. If data transfer has been completed, a channel is put in an idle state. Data transfer is completed either normally or abnormally (e.g. occurrence of errors). An interrupt signal can be generated upon completion of data transfer. Fig. 10.4.1 shows the state transitions of channel operation.
Bus control authority not acquired Wait Start
Bus control authority not acquired Idle Transfer completed
Bus control authority acquired
Transfer Bus control authority acquired
Fig. 10.4.1 Channel Operation State Transition
TMP19A64(rev1.1)-10-21
TMP19A64C1D
(6) Combinations of transfer modes The DMAC can transfer data by combining each transfer mode as follows:
Transfer request Internal External
Edge/level "L" level (INTDREQn) "L" level (DREQn) Falling edge (DREQn)
Address mode
Transfer devices Memory memory Memory memory Memory I/O I/O memory Memory memory Memory I/O I/O memory
Dual
External
(7) Address changes Address changes are broadly classified into three types: increases, decreases and fixed. The type of address change can be specified for each source and destination address by using SAC and DAC in the CCRn register. For a memory device, an increase, decrease or fixed can be specified. For an I/O device, however, only "fixed" can be specified. If an I/O device is selected as a source or destination device, SAC or DAC in the CCRn register must be set to "fixed." If address increase or decrease is selected, the bit position for counting can be specified using SACM or DACM in the DTCRn register. To specify the bit position for counting a source address, SACM must be used, while DACM must be used to specify the bit position for a destination address. Any of the bits 0, 4, 8, 12 and 16 can be specified as the bit position for address counting. If 0 is selected, an address normally increases or decreases. By selecting bits 4, 8, 12 or 16, it is possible to increase or decrease an address irregularly. Examples of address changes are shown below. Example 1: Monotonic increase for a source device and irregular increase for a destination device
SAC: Address increase DAC: Address increase TrSiz: Transfer unit 32 bits Source address: 0xA000_1000 Destination address: 0xB000_0000 SACM: 000 counting to begin from bit 0 of the address counter DACM: 001 counting to begin from bit 4 of the address counter Source 0xA000_1000 0xA000_1001 0xA000_1002 0xA000_1003 Destination 0xB000_0000 0xB000_0010 0xB000_0020 0xB000_0030 ...
1st 2nd 3rd 4th ...
TMP19A64(rev1.1)-10-22
TMP19A64C1D
Example 2: Irregular decrease for a source device and monotonic decrease for a destination device
SAC: Address decrease DAC: Address decrease TrSiz: Transfer unit 16 bits Source address: Initial value 0xA000_1000 Destination address: 0xB000_0000 SACM: 010 counting to begin from bit 8 of the address counter DACM: 000 counting to begin from bit 0 of the address counter
1st 2nd 3rd 4th
Source 0xA000_1000 0x9FFF_FF00 0x9FFF_FE00 0x9FFF_FD00 ...
Destination 0xB000_0000 0xAFFF_FFFE 0xAFFF_FFFC 0xAFFF_FFFA ...
10.4.2
Transfer Request
For the DMAC to transfer data, a transfer request must be issued to the DMAC. There are two types of transfer request: an internal transfer request and an external transfer request. Either of these transfer requests can be selected and specified for each channel. Whichever is selected, the DMAC acquires bus control authority and starts to transfer data if the transfer request is generated after the start of channel operation. * Internal transfer request If the Str bit of CCR is set to "1" when the ExR bit of CCRn is "0," a transfer request is generated immediately. This transfer request is called an internal transfer request. The internal transfer request is valid until the channel operation is completed. Therefore, data can be transferred continuously if either of two events shown below does not occur: * A transition to a channel of higher priority * A shift of bus control authority to another bus master of higher priority In the case of the internal transfer request, data can only be transferred from memory to memory. * External transfer request If the ExR bit of CCRn is "1," setting the Str bit of CCR to "1" allows a channel to go into a standby mode. The INTC or an external device then generates the INTDREQn or DREQn signal for this channel to notify the DMAC of a transfer request, and a transfer request is generated. This transfer request is called an external transfer request. In the case of the external transfer request, data can be transferred from memory to memory and between memory and an I/O device. The TMP19A64 recognizes the transfer request signal by detecting the "L" level of the INTDREQn signal or by detecting the falling edge or "L" level of the DREQn signal. The unit of data to be transferred in response to one transfer request is specified in the TrSiz field of CCRn, and 32, 16 or 8 bits can be selected. Transfer requests using INTDREQn and DREQn are described in detail on the next page.
TMP19A64(rev1.1)-10-23
TMP19A64C1D
A transfer request made by the interrupt controller (INTC) A transfer request made by the interrupt controller is cleared using the DACKn signal. This DACKn signal is asserted only if a bus cycle for an I/O device or the number of bytes (value set in the BCRn register) transferred from memory to memory becomes "0." Therefore, if data is transferred between memory and an I/O device, the amount of data specified by TrSiz is transferred only once because INTDREQn is cleared upon completion of one data transfer from one transfer request. On the other hand, if data is transferred from memory to memory, it can be transferred successively in response to a transfer request because INTDREQn is not cleared until the number of bytes transferred (value set in the BCRn register) becomes "0." Note that if the DMAC acknowledges an interrupt set in INTDREQn and if this interrupt is cleared by the INTC before DMA transfer begins, there is a possibility that DMA transfer might be executed once after the interrupt is cleared, depending on the timing. A transfer request made by an external device External pins (DREQ2 and DREQ3) are internally wired to allow them to function as pins of the port F and port J. These pins can be selected by setting the function control registers PFFC and PJFC to an appropriate setting. If both ports are set to use the DMAC function, the port F is given priority in using the DMAC function. In the edge mode, the DREQn signal must be deasserted and then asserted for each transfer request to create an effective edge. In the level mode, however, successive transfer requests can be recognized by maintaining an effective level. In memory-to-memory transfer, only the "L" level mode can be used. In I/O-to-memory transfer, only the falling edge mode can be used. - Level mode In the level mode, the DMAC detects the "L" level of the DREQn signal upon the rising of the internal system clock. If it detects the "L" level of the DREQn signal when a channel is in a standby mode, it goes into transfer mode and starts to transfer data. To use the DREQn signal at an active level, the PosE bit (bit 13) of the CCRn register must be set to "0." The DACKn signal is active at the "L" level, as in the case of the DREQn signal. If an external circuit asserts the DREQn signal, the DREQn signal must be maintained at the "L" level until the DACKn signal is asserted. If the DREQn signal is deasserted before the DACKn signal is asserted, a transfer request may not be recognized. If the DREQn signal is not at the "L" level, the DMAC judges that there is no transfer request, and starts a transfer operation for other channels or releases bus control authority and goes into a standby mode. The unit of a transfer request is specified in the TrSiz field () of the CCRn register.
TMP19A64(rev1.1)-10-24
TMP19A64C1D
DREQn
A[31:1]
Transfer data
DACKn
Fig. 10.4.2.1 Transfer Request Timing (Level Mode) - Edge mode In the edge mode, the DMAC detects the falling edge of the DREQn signal. If it detects the falling edge of the DREQn signal upon the rising of the internal system clock (the case in which the "L" level is detected upon the rising of the system clock although it was not detected upon the rising of the previous system clock) when a channel is in a standby mode, it judges that there is a transfer request, goes into transfer mode, and starts a transfer operation. To detect the falling edge of the DREQn signal, the PosE bit (bit 13) of the CCRn register must be set to "0," and the Lev bit (bit 12) must also be set to "0." The DACKn signal is active at the "L" level. If the falling edge of the DREQn signal is detected after the DACKn signal is asserted, the next data is transferred without a pause. If there is no falling edge of the DREQn signal after the DACKn signal is asserted, the DMAC judges that there is no transfer request, and starts a transfer operation for other channels or goes into a standby mode after releasing bus control authority. The unit of a transfer request is specified in the TrSiz field () of the CCRn register.
DREQn
A[31:1]
Transfer data
Transfer data
DACKn
Fig. 10.4.2.2 Transfer Request Timing (Edge Mode)
TMP19A64(rev1.1)-10-25
TMP19A64C1D
10.4.3
Address Mode
In the address mode, whether the DMAC executes data transfers by outputting addresses to both source and destination devices or it does by outputting addresses to either a source device or a destination device is specified. The former is called the dual address mode, and the latter is called the single address mode. For TMP19A64, only the dual address mode is available. In the dual address mode, The DMAC first performs a read of the source device by storing the data output by the source device in one of its registers (DHR). It then executes a write on the destination device by writing the stored data to the device, thereby completing the data transfer.
DMAC
Source device
Address Address bus
Data Data bus
Destination device
Fig. 10.4.3.1 Basic Concept of Data Transfer in the Dual Address Mode The unit of data to be transferred by the DMAC is the amount of data (32, 16 or 8 bits) specified in the TrSiz field of the CCRn. One unit of data is transferred each time a transfer request is acknowledged. In the dual address mode, the unit of data is read from the source device, put into the DHR and written to the destination device. Access to memory takes place when the specified unit of data is transferred. If access to external memory takes place, 16-bit access takes place twice if the unit of data is set to 32 bits and if the bus width set in the CS wait controller is 16 bits. Likewise, if the unit of data is set to 32 bits and if the bus width set in the CS wait controller is 8 bits, 8-bit access takes place four times. If data is to be transferred from memory to an I/O device or from an I/O device to memory, the unit of data to be transferred must be specified and, at the same time, the bus width of an I/O device (device port size) must be specified in the DPS field of the CCRn (32, 16 or 8 bits).
TMP19A64(rev1.1)-10-26
TMP19A64C1D
If the unit of data to be transferred is equal to a device port size, a read or write is executed once for an I/O device. If a device port size is smaller than the unit of data to be transferred, the DMAC performs a read or write for an I/O device more than once. For example, if the unit of data to be transferred is 32 bits and if data is transferred from an I/O device whose device port size is 8 bits to memory, 8 bits of data are read from an I/O device four consecutive times and stored in the DHR. This 32-bit data is then written to memory all at once (twice if the data is written to external memory and if the bus width is 16 bits). An address change occurs by the amount defined as the unit of data to be transferred. The BCRn value also changes by the same amount. A device port size must not be larger than the unit of data to be transferred. The relationships between units of data to be transferred and device port sizes are summarized in Table 10.4.3.2. Table 10.4.3.2 Units of Data to Be Transferred and Device Port Sizes (Dual Address Mode)
TrSiz 0x (32 bits) 0x (32 bits) 0x (32 bits) 10 (16 bits) 10 (16 bits) 10 (16 bits) 11 (8 bits) 11 (8 bits) 11 (8 bits) DPS 0x (32 bits) 10 (16 bits) 11 (8 bits) 0x (32 bits) 10 (16 bits) 11 (8 bits) 0x (32 bits) 10 (16 bits) 11 (8 bits) Bus operations performed on I/O device Once Twice 4 times Setting prohibited Once Twice Setting prohibited Setting prohibited Once
TMP19A64(rev1.1)-10-27
TMP19A64C1D
10.4.4
Channel Operation
A channel is activated if the Str bit of the CCRn of a channel is set to "1." If a channel is activated, an activation check is conducted and if no error is detected, the channel is put into a standby mode. If a transfer request is generated when a channel is in a standby mode, the DMAC acquires bus control authority and starts to transfer data. Channel operation is completed either normally or abnormally (forced termination or occurrence of an error). Either normal completion or abnormal completion is indicated to the CSRn. Start of channel operation A channel is activated if the Str bit of the CCRn is set to "1." When a channel is activated, a configuration error check is conducted and if no error is detected, the channel is put into a standby mode. If an error is detected, the channel is deactivated and this state of completion is considered to be abnormal completion. When a channel goes into a standby mode, the Act bit of the CSRn of that channel becomes "1." If a channel is programmed to start operation in response to an internal transfer request, a transfer request is generated immediately and the DMAC acquires bus control authority and starts to transfer data. If a channel is programmed to start operation in response to an external transfer request, the DMAC acquires bus control authority after INTDREQn or DREQn is asserted, and starts to transfer data. Completion of channel operation A channel completes operation either normally or abnormally and either one of these states is indicated to the CSRn. If an attempt is made to set the Str bit of the CCRn register to "1" when the NC or AbC bit of the CSRn register is "1," channel operation does not start and the completion of operation is considered to be abnormal completion. Normal completion Channel operation is considered to have been completed normally in the case shown below. For channel operation to be considered to have been completed normally, the transfer of a unit of data (value specified in the TrSiz field of CCRn) must be completed successfully. * When the contents of BCRn become 0 and data transfer is completed
Abnormal completion Cases of abnormal completion of DMAC operation are as follows: * Completion due to a configuration error A configuration error occurs if there is a mistake in the DMA transfer setting. Because a configuration error occurs before data transfer begins, values specified in SARn, DARn and BCRn remain the same as when they were initially specified. If channel operation is completed abnormally due to a configuration error, the AbC bit of the CSRn is set to "1," along with the Conf bit. Causes of a configuration error are as follows: - - - - - - Both SIO and DIO were set to "1." The Str bit of CCRn was set to "1" when the NC bit or AbC bit of CSRn was "1." A value that is not an integer multiple of the unit of data was set for BCRn. A value that is not an integer multiple of the unit of data was set for SARn or DARn. A prohibited combination of a device port size and a unit of data to be transferred was set. The Str bit of CCRn was set to "1" when the BCRn value was "0."
TMP19A64(rev1.1)-10-28
TMP19A64C1D
*
Completion due to a bus error If the DMAC operation has been completed abnormally due to a bus error, the AbC bit of CSRn is set to "1" and the BES or BED bit of CSRn is set to "1." - A bus error was detected during data transfer.
(Note)
If the DMAC operation has been completed abnormally due to a bus error, BCR, SAR and DAR values cannot be guaranteed. If a bus error persists, refer to 21. "List of Functional Registers" which appear later in this document.
10.4.5
Order of Priority of Channels
Concerning the eight channels of the DMAC, the smaller the channel number assigned to each channel, the higher the priority. If a transfer request is generated to channels 0 and 1 simultaneously, a transfer request for channel 0 is processed with higher priority and the transfer operation is performed accordingly. When the transfer request for channel 0 is cleared, the transfer operation for channel 1 is performed if the transfer request still exists (An internal transfer request is retained if it is not cleared. The interrupt controller retains an external transfer request if the active state for an interrupt request assigned to DMA requests in the interrupt controller is set to edge mode. However, the interrupt controller does not retain an external transfer request if the active state is set to level mode. If the active state for an interrupt request assigned to DMA requests in the interrupt controller is set to level mode, it is necessary to continue asserting the interrupt request signal). If a transfer request is generated when data is being transferred through channel 1, a channel transition occurs at channel 0, that is, data transfer through channel 1 is temporarily suspended and data transfer through channel 0 is started. When the transfer request for channel 0 is cleared, data transfer through channel 1 resumes. Channel transitions occur upon the completion of data transfers (when the writing of all data in the DHR has been completed). Interrupts Upon completion of a channel operation, the DMAC can generate interrupt requests (INTDMAn: DMA transfer completion interrupt) to the TX19A processor core with two types of interrupts available: a normal completion interrupt and an abnormal completion interrupt. * Normal completion interrupt If a channel operation is completed normally, the NC bit of CSRn is set to "1." If a normal completion interrupt is authorized for the NIEn bit of the CCRn, the DMAC requests the TX19A processor core to authorize an interrupt. * Abnormal completion interrupt If a channel operation is completed abnormally, the AbC bit of CSRn is set to "1." If an abnormal completion interrupt is authorized for the AbIEn bit of the CCRn, the DMAC requests the TX19A processor core to authorize an interrupt.
TMP19A64(rev1.1)-10-29
TMP19A64C1D
10.5 Timing Diagrams
DMAC operations are synchronous to the rising edges of the internal system clock.
10.5.1
Dual Address Mode
* Memory-to-memory transfer Fig. 10.5.1.1 shows an example of the timing with which 16-bit data is transferred from one external memory (16-bit width) to another (16-bit width). Data is actually transferred successively until BCRn becomes "0."
tsys A[23:0] /CS0 /CS1 /RD /WR,/HWR D[15:0]
Data Data
Read
Write
Fig. 10.5.1.1 Dual Address Mode (Memory-to-Memory) * Memory-to-I/O device transfer Fig. 10.5.1.2 shows an example of the timing with which data is transferred from memory to an I/O device if the unit of data to be transferred is set to 16 bits and if the device port size is set to 8 bits.
tsys A[23:0] /CS0 /CS1 /RD /WR D[15:0]
Data Data Data
Read
Write
Write
Fig. 10.5.1.2 Dual Address Mode (Memory-to-I/O Device)
TMP19A64(rev1.1)-10-30
TMP19A64C1D
*
I/O device-to-memory transfer Fig. 10.5.1.3 shows an example of the timing with which data is transferred from an I/O device to memory if the unit of data to be transferred is set to 16 bits and if the device port size is set to 8 bits.
tsys
A[23:0] /CS0 /CS1 /RD /WR D[15:0]
Data Data Data
Read
Read
Write
Fig. 10.5.1.3 Dual Address Mode (I/O Device-to-Memory)
TMP19A64(rev1.1)-10-31
TMP19A64C1D
10.5.2
DREQn-Initiated Transfer Mode
* Data transfer from internal RAM to external memory (multiplexed bus, 5-wait insertion, level mode) Fig. 10.5.2.1 shows two timing cycles in which 16-bit data is transferred twice from internal RAM to external memory (16-bit width).
(7+) clock (7+) 5 waits 5
Internal system clock
/DREQn /DACKn ALE A[23:16] AD[15:0] /RD /WR /HWR /CSn R/W_
Add Add Data Add Data
Fig. 10.5.2.1 Level Mode (from Internal RAM to External Memory)
*
Data transfer from external memory to internal RAM (multiplexed bus, 5-wait insertion, level mode) Fig. 10.5.2.2 shows two timing cycles in which 16-bit data is transferred twice from external memory (16-bit width) to internal RAM.
(7+) clock (7+) Internal system clock
5 waits 5
/DREQn /DACKn ALE A[23:16] AD[15:0] /RD /WR /HWR /CSn R/W_
Add Add Data Add Data
Fig. 10.5.2.2 Level Mode (from External Memory to Internal RAM)
TMP19A64(rev1.1)-10-32
TMP19A64C1D
*
Data transfer from internal RAM to external memory (separate bus, 5-wait insertion, level mode) Fig. 10.5.2.3 shows two timing cycles in which 16-bit data is transferred twice from internal RAM to external memory (16-bit width).
(7+) clock (7+) 5 waits 5
Internal system clock
/DREQn /DACKn A[23:0] D[15:0] /RD /WR /HWR /CSn R/W_
Fig. 10.5.2.3 Level Mode (Internal RAM to External Memory)
*
Data transfer from external memory to internal RAM (separate bus, 5-wait insertion, level mode) Fig. 10.5.2.4 shows two timing cycles in which 16-bit data is transferred twice from external memory (16-bid width) to internal RAM.
(7+) clock (7+) Internal system clock
5 waits 5
/DREQn /DACKn A[23:0] D[15:0] /RD /WR /HWR /CSn R/W_
Fig. 10.5.2.4 Level Mode (from External Memory to Internal RAM)
TMP19A64(rev1.1)-10-33
TMP19A64C1D
*
Data transfer from internal RAM to external memory (multiplexed bus, 5-wait insertion, edge mode) Fig. 10.5.2.5 shows one timing cycle in which 16-bit data is transferred once from internal RAM to external memory (16-bit width).
(7+) clock (7+) 5 waits 5
Internal system clock
/DREQn /DACKn ALE A[23:16] AD[15:0] /RD /WR /HWR /CSn R/W_
Add Add Data
Fig. 10.5.2.5 Edge Mode (from Internal RAM to External Memory) * Data transfer from external memory to internal RAM (multiplexed bus, 5-wait insertion, edge mode) Fig. 10.5.2.6 shows one timing cycle in which 16-bit data is transferred once from external memory (16-bit width) to internal RAM.
(7+) clock (7+) Internal system clock 5 waits 5
/DREQn /DACKn ALE A[23:16] AD[15:0] /RD /WR /HWR /CSn R/W_
Add Add Data
Fig. 10.5.2.6 Edge Mode (from External Memory to Internal RAM)
TMP19A64(rev1.1)-10-34
TMP19A64C1D
*
Data transfer from internal RAM to external memory (separate bus, 5-wait insertion, edge mode) Fig. 10.5.2.7 shows one timing cycle in which 16-bit data is transferred once from internal RAM to external memory (16-bit width).
(7+) (7+) clock
5 waits 5
Internal system clock
/DREQn /DACKn A[23:0] D[15:0] /RD /WR /HWR /CSn R/W_
Fig. 10.5.2.7 Edge Mode (from Internal RAM to External Memory) * Data transfer from external memory to internal RAM (separate bus, 5-wait insertion, edge mode) Fig. 10.5.2.8 shows one timing cycle in which 16-bit data is transferred once from external memory (16-bit width) to internal RAM.
(7+) (7+) clock
Internal system clock 5 waits 5
/DREQn /DACKn A[23:0] D[15:0] /RD /WR /HWR /CSn R/W_
Fig. 10.5.2.8 Edge Mode (from External Memory to Internal RAM)
TMP19A64(rev1.1)-10-35
TMP19A64C1D
10.6 Case of Data Transfer
The settings described below relate to a case in which serial data received (SCnBUF) is transferred to the internal RAM by DMA transfer. DMA (ch.0) is used to transfer data. The DMA0 is activated by a receive interrupt generated by SIO1. * * * * Channel used: 0 Source address: SC1BUF Destination: (Physical address) 0xFFFF_9800 Number of bytes transferred: 256 bytes
* * * Data length 8 bits: UART Serial channel: ch 1 Transfer rate: 9600 bps

IMC4 INTCLR SC1MOD0 SC1CR BR1CR 0xxxxx_xx70 0x40 0x29 0x00 0x1F /* @fc=54MHz, Transfer rate setting */ /* assigned to DMC0 activation factor * / /* IVR [9:4], INTRX1 interrupt factor * / /* UART mode, 8-bit length, baud rate generator * /

DCR IMCE INTCLR IMCE DTCR0 SAR0 DAR0 BCR0 CCR0 0x8000_0000 0xxxxx_xx40 0xE0 0xxxxx_xx44 0x0000_0000 0xFFFF_F208 0xFFFF_9800 0x0000_00FF 0x80c0_5B0f /* DMA reset * / /* Disable interrupt setting */ /* IVR [8:0] value * / /* level = 4 (any given value) */ /* DACM = 000 */ /* SACM = 000 */ /* physical address of SC1BUF */ /* physical address of destination to which data is transferred */ /* 256 (number of bytes transferred) / /* DMA ch.0 setting */
TMP19A64(rev1.1)-10-36
TMP19A64C1D
11. 16-bit Timer/Event Counters (TMRBs)
Each of the eleven channels (TMRB0 through TMRBA) has a multi-functional, 16-bit timer/event counter. TMRBs operate in the following four operation modes: * * * * 16-bit interval timer mode 16-bit event counter mode 16-bit programmable square-wave output (PPG) mode Two-phase pulse input counter mode (quad-speed and TMRBA) * * * Frequency measurement mode Pulse width measurement mode Time difference measurement mode
The use of the capture function allows TMRBs to operate in three other modes:
Each channel consists of a 16-bit up-counter, two 16-bit timer registers (one of which is double-buffered), two 16-bit capture registers, two comparators, a capture input control, a timer flip-flop and its associated control circuit. Each channel (TMRB0 through TMRBA) functions independently and while the channels operate in the same way, there are differences in their specifications as shown in Table 11.1 and the two-phase pulse count function. Therefore, the operational descriptions here are for TMRB0 only and for the two-phase pulse count function TMRBA only.
TMP19A64(rev1.1)-11-1
TMP19A64C1D
Table 11.1 Differences in the Specifications of TMRB Modules
Channel Specification
External clock/ capture trigger input pins External pins Timer flip-flop output pin Internal signals Timer for capture triggers Timer RUN register Timer control register Timer mode register Timer flip-flop control register Timer status register Timer UC preset register Register names Timer register
TMRB0
TB0IN0 (shared with PA0) TB0IN1 (shared with PA1)
TMRB1
TB1IN0 (shared with PA3) TB1IN1 (shared with PA4)
TMRB2
TMRB3
TMRB4
TMRB5
-
-
-
-
TB1OUT TB2OUT TB3OUT TB4OUT TB5OUT TB0OUT (shared with PA2) (shared with PA5) (shared with PA6) (shared with PA7) (shared with PB0) (shared with PB1) TB9OUT TB0RUN TB0CR TB0MOD TB0FFCR TB0ST TB0UCL TB0UCH TB0RG0L TB0RG0H TB0RG1L TB0RG1H TB0CP0L TB0CP0H TB0CP1L TB0CP1H TB9OUT TB1RUN TB1CR TB1MOD TB1FFCR TB1ST TB1UCL TB1UCH TB1RG0L TB1RG0H TB1RG1L TB1RG1H TB1CP0L TB1CP0H TB1CP1L TB1CP1H TB9OUT TB2RUN TB2CR TB2MOD TB2FFCR TB2ST TB2UCL TB2UCH TB2RG0L TB2RG0H TB2RG1L TB2RG1H TB2CP0L TB2CP0H TB2CP1L TB2CP1H TB9OUT TB3RUN TB3CR TB3MOD TB3FFCR TB3ST TB3UCL TB3UCH TB3RG0L TB3RG0H TB3RG1L TB3RG1H TB3CP0L TB3CP0H TB3CP1L TB3CP1H TB9OUT TB4RUN TB4CR TB4MOD TB4FFCR TB4ST TB4UCL TB4UCH TB0RG0L TB4RG0H TB4RG1L TB4RG1H TB4CP0L TB4CP0H TB4CP1L TB4CP1H TB3OUT TB5RUN TB5CR TB5MOD TB5FFCR TB5ST TB5UCL TB5UCH TB5RG0L TB5RG0H TB5RG1L TB5RG1H TB5CP0L TB5CP0H TB5CP1L TB5CP1H
Capture register
Channel Specification
External clock/ capture trigger input pins External pins Timer flip-flop output pin Internal signals Timer for capture triggers Timer RUN register Timer control register Timer mode register Timer flip-flop control register Timer status register Timer UC preset register Register names Timer register
TMRB6
TMRB7
TMRB8
TMRB9
TMRBA
TBAIN0 (shared with PB6) TBAIN1 (shared with PB7) - TB3OUT TBARUN TBACR TBAMOD TBAFFCR TBAST TBAUCL TBAUCH TBARG0L TBARG0H TBARG1L TBARG1H TBACP0L TBACP0H TBACP1L TBACP1H
-
-
-
-
TB6OUT TB7OUT TB8OUT TB9OUT (shared with PB2) (shared with PB3) (shared with PB4) (shared with PB5) TB3OUT TB6RUN TB6CR TB6MOD TB6FFCR TB6ST TB6UCL TB6UCH TB6RG0L TB6RG0H TB6RG1L TB6RG1H TB6CP0L TB6CP0H TB6CP1L TB6CP1H TB3OUT TB7RUN TB7CR TB7MOD TB7FFCR TB7ST TB7UCL TB7UCH TB7RG0L TB7RG0H TB7RG1L TB7RG1H TB7CP0L TB7CP0H TB7CP1L TB7CP1H TB3OUT TB8RUN TB8CR TB8MOD TB8FFCR TB8ST TB8UCL TB8UCH TB8RG0L TB8RG0H TB8RG1L TB8RG1H TB8CP0L TB8CP0H TB8CP1L TB8CP1H TB3OUT TB9RUN TB9CR TB9MOD TB9FFCR TB9ST TB9UCL TB9UCH TB9RG0L TB9RG0H TB9RG1L TB9RG1H TB9CP0L TB9CP0H TB9CP1L TB9CP1H
Capture register
TMP19A64(rev1.1)-11-2
(Note)
Internal data bus run/ clear 2 T1 T4 Capture register 0 TB0CP0H/L TB0MOD Capture control TB0RUN TB0MOD Count clock 16-bit up-counter (UC0) Timer flip-flop control TB0FF0 Timer flip-flop Capture register 1 TB0CP1H/L T16 Timer flip-flop output TB0OUT 4 8 16 32 TB0RUN Internal data bus Selector TB0MOD T1 T4 T16 TB0MOD
Match detection Match detection
Prescaler clock: T0
CAPTRG TB0IN0 TB0IN1
11.1 Block Diagram of Each Channel
TMRB0 interrupt INTTB0
INTTB01 INTTB91 INTTB00 INTTB90
16-bit comparator (CP0)
16-bit comparator (CP1)
Overflow interrupt output
Register 0 interrupt
Register 1 interrupt
TMRB2 through TMRB9 have no external clock and capture trigger input functions.
16-bit timer register TB0RG0H/L 16-bit timer register TB0RG1H/L
Fig. 11.1.1 TMRB0 Block Diagram (Same for Channels 1 through 9)
TMP19A64(rev1.1)-11-3
TB0RUN Register buffer 0 Internal data bus Internal data bus
16-bit timer status register TB0ST
TMP19A64C1D
Internal data bus run/ clear TBARUN Capture register 0 TBACP0H/L Timer flip-flop Timer flip-flop control TBAFF0 Capture register 1 TBACP1H/L
Internal data bus
(Note)
2 T1 T4 TBAMOD TBARUN TBAMOD Count clock 16-bit up-and-down counter (UC0) TBARUN Selector Up-and-down control TMRBA interrupt INTTBA 16-bit comparaotr (CP0)
Match detection
Prescaler clock : T0
There is no TBAOUT external output.
CAPTRG TBAIN0 TBAIN1
Timer flip-flop output TBAOUT
Fig. 11.1.2 TMRBA Block Diagram
TMP19A64(rev1.1)-11-4
16-bit timer register TBARG0H/L TBARUN Register buffer 0 Internal data bus
Match detection 16-bit comparator (CP1) 16-bit timer register TBARG1H/L Internal data bus
Up-and-down interrupt output
16-bit timer status register TBAST
Register 0 interrupt output
Register 1 interrupt output
Underflow interrupt output
Overflow interrupt output
TMP19A64C1D
TMP19A64C1D
11.2 Description of Operations for Each Circuit
11.2.1 Prescaler
There is a 5-bit prescaler for acquiring the TMRB0 source clock. The prescaler input clock T0 is fperiph/2, fperiph/4, fperiph/8 or fperiph/16 selected by SYSCR0 in the CG. The peripheral clock, fperiph, is either fgear, a clock selected by SYSCR1 in the CG, or fc, which is a clock before it is divided by the clock gear. The operation or the stoppage of a prescaler is set with TB0RUN where writing "1" starts counting and writing "0" clears and stops counting. Table 11.2.1 shows prescaler output clock resolutions.
TMP19A64(rev1.1)-11-5
TMP19A64C1D
Table 11.2.1 Prescaler Output Clock Resolutions
@fc = 54MHz Release peripheral clock Clock gear value Select prescaler clock 00(fperiph/16) 000 (fc) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 100 (fc/2) 0 (fgear) 110 (fc/4) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 111 (fc/8) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 000 (fc) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 100 (fc/2) 1 (fc) 110 (fc/4) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 111 (fc/8) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2)
5 4 3
Prescaler output clock resolutions T1 fc/2 (0.59 s) fc/2 (0.30 s) fc/2 (0.15 s) fc/22(0.07 s) fc/2 (1.19 s)
6 7 6 5
T4 fc/2 (2.37 s) fc/2 (1.19 s) fc/2 (0.59 s) fc/24(0.30 s) fc/2 (4.74 s)
8 9
T16 fc/2 (9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/210(18.96 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/211(37.93 s) fc/210(18.96 s) fc/29(9.48 s) fc/28(4.74 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/29(9.48 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s)
fc/25(0.59 s) fc/24(0.30 s) fc/2 (0.15 s)
3
fc/27(2.37 s) fc/26(1.19 s) fc/2 (0.59 s)
5
fc/27(2.37 s) fc/26(1.19 s) fc/2 (0.59 s)
5
fc/29(9.48 s) fc/28(4.74 s) fc/2 (2.37 s)
7
fc/24(0.30 s) fc/2 (4.74 s)
8
fc/26(1.19 s) fc/2 (18.96 s)
10
fc/27(2.37 s) fc/26(1.19 s) fc/2 (0.59 s)
5
fc/29(9.48 s) fc/28(4.74 s) fc/2 (2.37 s)
7
fc/25(0.59 s) fc/24(0.30 s) fc/2 (0.15 s)
3
fc/27(2.37 s) fc/26(1.19 s) fc/2 (0.59 s)
5
fc/22(0.07 s) fc/25(0.59 s) fc/2 (0.30 s)
4
fc/24(0.30 s) fc/27(2.37 s) fc/2 (1.19 s)
6
fc/23(0.15 s) fc/25(0.59 s) fc/24(0.30 s) fc/25(0.59 s)
fc/25(0.59 s) fc/2 (0.30 s)
4
fc/27(2.37 s) fc/26(1.19 s) fc/2 (0.59 s)
5
fc/24(0.30 s) fc/27(2.37 s) fc/2 (1.19 s)
6
fc/25(0.59 s)
(Note 1) The prescaler output clock Tn must be selected so that TnTMP19A64(rev1.1)-11-6
TMP19A64C1D
11.2.2
Up-counter (UC0) and Up-counter Capture Registers (TB0UCL, TB0UCH)
This is the 16-bit binary counter that counts up in response to the input clock specified by TB0MOD. UC0 input clock can be selected from either three types - T0, T2 and T8 - of prescaler output clock or the external clock of the TB0IN0 pin. For UC0, start, stop and clear are specified by TB0RUN and if UC0 matches the TB0RG1H/L timer register, it is cleared to "0" if the setting is "clear enable." Clear enable/disable is specified by TB0MOD. If the setting is "clear disable," the counter operates as a free-running counter. The current count value of the UC0 can be captured by reading the TB0UCL and TB0UCH registers. Note Make sure that reading is performed in the order of low-order bits followed by high-order bits.
If UC0 overflow occurs, the INTTB01 overflow interrupt is generated. TMRBA have the two-phase pulse input count function. The two-phase pulse count mode is activated by TBARUN. This counter serves as the up-and-down counter, and is initialized to 0x7FFF. If a counter overflow occurs, the initial value 0x0000 is reloaded. If a counter underflow occurs, the initial value 0xFFFF is reloaded. When the two-phase pulse count mode is not active, the counter counts up only.
11.2.3
Timer Registers (TB0RG0H/L, TB0RG1H/L)
These are 16-bit registers for specifying counter values and two registers are built into each channel. If a value set on this timer register matches that on a UC0 up-counter, the match detection signal of the comparator becomes active. To write data to the TB0RG0H/L and TB0RG1H/L timer registers, either a 2-byte data transfer instruction or a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high-order 8 bits can be used. TB0RG0 of this timer register is paired with register buffer 0 - a double-buffered configuration. TB0RG0 uses TB0RUN to control the enabling/disabling of double buffering so that if = "0," double buffering is disabled and if = "1," it is enabled. If double buffering is enabled, data is transferred from register buffer 0 to the TB0RG0 timer register when there is a match between UC0 and TB0RG1. The values of TB0RG0 and TB0RG1 become undefined after a reset so to use a 16-bit timer, it is necessary to write data to them beforehand. A reset initializes TB0RUN to "0" and sets double buffering to "disable." To use double buffering, write data to the timer register, set to "1" and then write the following data to the register buffers. TB0RG0 and the register buffers are assigned to the same address: 0xFFFF_F18A/0xFFFF_F18B. If = "0," the same value is written to TB0RG0 and each register buffer; if = "1," the value is only written to each register buffer. To write an initial value to the timer register, therefore, the register buffers must be set to "disable."
TMP19A64(rev1.1)-11-7
TMP19A64C1D
11.2.4
Capture Registers (TB0CP0H/L, TB0CP1H/L)
To read data from the capture register, use 1-byte data transfer instruction twice and make sure that reading is performed in the order of low-order bits followed by high-order bits. (Don't use 2-byte transfer instruction for data reading.)
11.2.5
Capture
This is a circuit that controls the timing of latching values from the UC0 up-counter into the TB0CP0 and TB0CP1 capture registers. The timing with which to latch data is specified by TB0MOD . Software can also be used to import values from the UC0 up-counter into the capture register; specifically, UC0 values are taken into the TB0CP0 capture register each time "0" is written to TB0MOD. To use this capability, the prescaler must be running (TB0RUN = "1"). In the two-phase pulse count mode (TMRBA), the counter value is captured by using software. (Note 1) Although a read of low-order 8 bits in the capture register suspends the capture operation, it is resumed by successively reading high-order 8 bits. (Note 2) If the timer stops after a read of low-order 8 bits, the capture operation remains suspended even after the timer restarts. Please ensure that the timer is not stopped after a read of low-order 8 bits.
11.2.6
Comparators (CP0, CP1)
These are 16-bit comparators for detecting a match by comparing set values of the UC0 up-counter with set values of the TB0RG0 and TB0RG1 timer registers. If a match is detected, INTTB0 is generated.
11.2.7
Timer Flip-flop (TB0FF0)
The timer flip-flop (TB0FF0) is reversed by a match signal from the comparator and a latch signal to the capture registers. It can be enabled or disabled to reverse by setting the TB0FFCR. The value of TB0FF0 becomes undefined after a reset. The flip-flop can be reversed by writing "00" to TB0FFCR. It can be set to "1" by writing "01," and can be cleared to "0" by writing "10." The value of TB0FF0 can be output to the timer output pin, TB0OUT (shared with PA2). To enable timer output, the port A related registers PACR and PAFC must be programmed beforehand.
TMP19A64(rev1.1)-11-8
TMP19A64C1D
11.3 Register Description
TMRBn RUN register (n=0 through 9)
7
TBnRUN (0xFFFF_F1x0) bit Symbol Read/Write After reset TBnRDE R/W R/W R/W R/W
6
5
4
3
I2TBn R/W
2
TBnPRU N R/W 0
1
0
TBnRUN
R 0
R/W 0
Function
Double Buffering 0: Disable 1: Enable
Write "0."
Write "0."
Write "0."
IDLE
0: Stop 1: Operate
Timer Run/Stop Control 0: Stop & clear 1: Count * The first bit can be read as "0."
: : :
Controls the TMRBn count operation. Controls the operation in the IDLE mode. Controls enabling/disabling of double buffering. TMRBA RUN register
7 6 5
UDACK R/W 0 Write "0." R/W 0 Sampling clock 0: fs 1: T0/4
: Controls the TMRBn prescaler operation.
4
TBAUDC E R/W 0 Enable/ disable twophase counter 0: Disable 1: Enable
3
I2TBA R/W 0
IDLE
2
1
0
TBARUN (0xFFFF_F1E0)
bit Symbol Read/Write After reset
TBARDE R/W 0 Double Buffering 0: Disable 1: Enable
0: Stop 1: Operate
TBAPRU TBARUN N R/W R R/W 0 0 0 Timer Run/Stop Control 0: Stop & clear 1: Count * The first bit can be read as "0."
Function
: :
Controls the TMRBA count operation. Controls the operation in the IDLE mode.
: Controls the TMRBA prescaler operation. : Controls enabling/disabling of the two-phase pulse input count operation. Enable: The counter counts up and counts down. Disable: This is the normal timer mode and the counter counts up only. : : Selects the two-phase pulse input sampling clock. Controls enabling/disabling of double buffering.
TMP19A64(rev1.1)-11-9
TMP19A64C1D
TMRBn control register (n=0 through A)
7
bit Symbol TBnCR (0xFFFF_F1x1) Read/Write After reset Function TBnEN R/W 0 TMRBn operation 0: Disable 1: Enable
6
R/W 0 Write "0."
5
R 0 This can be read as "0."
4
R 0 This can be read as "0."
3
R 0 This can be read as "0."
2
R 0 This can be read as "0."
1
R 0 This can be read as "0."
0
R 0 This can be read as "0."
: Specifies the TMRB operation. When the operation is disabled, no clock is supplied to the other registers in the TMRB module. This can reduce power dissipation. (This disables reading from and writing to the other registers.) To use the TMRB, enable the TMRB operation (set to "1") before programming each register in the TMRB module. If the TMRB operation is executed and then disabled, settings will be maintained in each register. TMRBn mode register (n=0 through A)
7
bit Symbol TBnMOD (0xFFFF_F1x2) Read/Write After reset
6
5
TBnCP0
4
TBnCPM 1 0
3
TBnCPM 0 0
2
TBnCLE R/W 0
Up-counter control 0: Clear/disable 1: Clear/enable
1
TBnCLK1
0
TBnCLK0
R 0 0 This can be read as "00."
W 1
Capture control by software 0: Capture by software
1: Don't care
Function
Capture timing 00: Disable 01: TBnIN0 TBnIN1 10: TBnIN0 TBnIN0 11: CAPTRG CAPTRG
0 0 Selects source clock 00: TB0IN0 pin input 01: T1 10: T4 11: T16
: Selects the TMRBn timer count clock. : Clears and controls the TMRBn up-counter. "0": "1": Disables clearing of the up-counter. Clears up-counter if there is a match with timer register 1 (TBnRG1).
: Specifies TMRBn capture timing. "00": Capture disable "01": Takes count values into capture register 0 (TBnCP0) upon the rising of TBnIN0 pin input. Takes count values into capture register 1 (TBnCP1) upon the rising of TBnIN1 pin input. "10": Takes count values into capture register 0 (TBnCP0) upon the rising of TBnIN0 pin input. Takes count values into capture register 1 (TBnCP1) upon the falling of TBnIN0 pin input. "11": Takes count value into capture register 0 (TBnCP0) upon the rising of the timer output for capture trigger (CAPTRG) and into capture register 1 (TBnCP1) upon the falling of CAPTRG (TB9OUT serves as CAPTRG for TMRB0 through TMRB4, and TB3OUT serves for TMRB5 through TMRBA.) : Captures count values by software and takes them into capture register 0 (TBnCP0). (Note) The value read from bit 5 of TBnMOD is "1."
TMP19A64(rev1.1)-11-10
TMP19A64C1D
TMRBn flip-flop control register (n=0 through A)
7
bit Symbol TBnFFCR (0xFFFF_F1x3) Read/Write After reset
6
5
TBnC1T1
4
TBnC0T1
3
TBnE1T1
2
TBnE0T1
1
TBnFF0C 1 W 1
0
TBnFF0C 0 1
R
R/W
This is always read as "11." Function
TBnFF0 reverse trigger 0: Disable trigger 1: Enable trigger
When the up-counter value is taken into TBnCP1 When the up-counter value is taken into TBnCP0 When the up-counter matches TBnRG1 When the up-counter matches TBnRG0
TBnFF0 control 00: Invert 01: Set 10: Clear 11: Don't care * This is always as "11."
: Controls the timer flip-flop. "00": Reverses the value of TBnFF0 (reverse by using software). "01": Sets TBnFF0 to "1." "10": Clears TBnFF0 to "0." "11": Don't care (Note) Always read as "11." : Reverses the timer flip-flop when the up-counter matches the timer register 0,1 (TBnRG0,1). : Reverses the timer flip-flop when the up-counter value is taken into the capture register 0,1 (TBnCP0,1).
TMP19A64(rev1.1)-11-11
TMP19A64C1D
TMRBn status register (1)
TMRBn status register (n=0 through 9) 7
bit Symbol TBnST (0xFFFF_F1x4) Read/Write After reset Function
6
5
4
3
2
INTTBOFn
1
INTTBn1 R 0
0: Interrupt not generated 1: Interrupt generated
0
INTTBn0 0
0: Interrupt not generated 1: Interrupt generated
R 0 This can be read as "0."
0
0: Interrupt not generated 1: Interrupt generated
: Interrupt generated if there is a match with timer register 0 (TBnRG0) : Interrupt generated if there is a match with timer register 1 (TBnRG1) : Interrupt generated if an up-counter overflow occurs (Note) If any interrupt is generated, the flag that corresponds to the interrupt is set to TBnST and the generation of interrupt is notified to INTC. The flag is cleared by reading the TBnST register.
TMRBA status register (2) When TBARUN = 0: Normal timer mode
7
bit Symbol TBAST (0xFFFF_F1E4) Read/Write After reset Function
6
5
4
3
2
INTTBOFA
1
INTTBA1 R 0
0: Interrupt not generated 1: Interrupt generated
0
INTTBA0 0
0: Interrupt not generated 1: Interrupt generated
R 0 This can be read as "0."
0
0: Interrupt not generated 1: Interrupt generated
: Interrupt generated if there is a match with timer register 0 (TBARG0) : Interrupt generated if there is a match with timer register 1 (TBARG1) : Interrupt generated if an up-counter overflow occurs When TBARUN = 1: Two-phase pulse input count mode
7
bit Symbol TBAST (0xFFFF_F1E4) Read/Write After reset
6
5
4
INTTBUDA
3
INTTBUDFA
2
INTTBOUFA
1
0
R 0 This can be read as "0."
0
Up-and-down count 0: Not generated 1: Generated
R 0
Underflow 0: Not generated 1: Generated
0
Overflow 0: Not generated 1: Generated
Function
R 0 This can be read as "0."
: Interrupt generated if an up-and-down counter overflow occurs : Interrupt generated if an up-and-down counter underflow occurs : Interrupt generated if an up- or down-count occurs (Note) If any interrupt is generated, the flag that corresponds to the interrupt is set to TBAST and the generation of interrupt is notified to INTC. The flag is cleared by reading the TBAST register.
TMP19A64(rev1.1)-11-12
TMP19A64C1D
TBnRG0H/L and TBnRG1H/L timer registers
TBnRG0H/L timer registers (n=0 through A) 7
bit Symbol TBnRG0L (0xFFFF_F1x8) Read/Write After reset Function
6
5
4
3
2
1
0
TBnRG0L7 TBnRG0L6 TBnRG0L5 TBnRG0L4 TBnRG0L3 TBnRG0L2 TBnRG0L1 TBnRG0L0 W Undefined Timer count value, Data of low-order 8 bits
7
bit Symbol TBnRG0H (0xFFFF_F1x9) Read/Write After reset Function
6
5
4
3
2
1
0
TBnRG0H7 TBnRG0H6 TBnRG0H5 TBnRG0H4 TBnRG0H3 TBnRG0H2 TBnRG0H1 TBnRG0H0 W Undefined Timer count value, Data of low-order 8 bits
(Note)
To write data to the timer registers, use either a 2-byte data transfer instruction or a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high-order 8 bits.
TBnRG1H/L timer registers (n=0 through A) 7
bit Symbol TBnRG1L (0xFFFF_F1xA) Read/Write After reset Function
6
5
4
3
2
1
0
TBnRG1L7 TBnRG1L6 TBnRG1L5 TBnRG1L4 TBnRG1L3 TBnRG1L2 TBnRG1L1 TBnRG1L0 W Undefined Timer count value, Data of low-order 8 bits
7
bit Symbol TBnRG1H (0xFFFF_F1xB) Read/Write After reset Function
6
5
4
3
2
1
0
TBnRG1H7 TBnRG1H6 TBnRG1H5 TBnRG1H4 TBnRG1H3 TBnRG1H2 TBnRG1H1 TBnRG1H0 W Undefined Timer count value, Data of high-order 8 bits
(Note)
To write data to the timer registers, use either a 2-byte data transfer instruction or a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high-order 8 bits.
TMP19A64(rev1.1)-11-13
TMP19A64C1D
TBnCP0H/L and TBnCP1H/L capture registers
TBnCP0H/L capture registers (n=0 through A) 7
bit Symbol TBnCP0L (0xFFFF_F1xC) Read/Write After reset Function
6
5
4
3
2
1
0
TBnCP0L7 TBnCP0L6 TBnCP0L5 TBnCP0L4 TBnCP0L3 TBnCP0L2 TBnCP0L1 TBnCP0L0 R Undefined Timer capture value, Data of low-order 8 bits
7
bit Symbol TBnCP0H (0xFFFF_F1xD) Read/Write After reset Function
6
5
4
3
2
1
0
TBnCP0H7 TBnCP0H6 TBnCP0H5 TBnCP0H4 TBnCP0H3 TBnCP0H2 TBnCP0H1 TBnCP0H0 R Undefined Timer capture value, Data of high-order 8 bits
(Note)
To read data from the capture registers, use a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by highorder 8 bits. Don't use a 2-byte data transfer instruction.
TBnCP1H/L capture registers (n=0 through A) 7
bit Symbol TBnCP1L (0xFFFF_F1xE) Read/Write After reset Function
6
5
4
3
2
1
0
TBnCP1L7 TBnCP1L6 TBnCP1L5 TBnCP1L4 TBnCP1L3 TBnCP1L2 TBnCP1L1 TBnCP1L0 R Undefined Timer capture value, Data of low-order 8 bits
7
TBnCP1H (0xFFFF_F1xF) bit Symbol Read/Write After reset Function
6
5
4
3
2
1
0
TBnCP1H7 TBnCP1H6 TBnCP1H5 TBnCP1H4 TBnCP1H3 TBnCP1H2 TBnCP1H1 TBnCP1H0 R Undefined Timer capture value, Data of high-order 8 bits
(Note)
To read data from the capture registers, use a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by highorder 8 bits. Don't use a 2-byte data transfer instruction.
TMP19A64(rev1.1)-11-14
TMP19A64C1D
11.4 Description of Operations for Each Mode
11.4.1 16-bit Interval Timer Mode
<< Generating interrupts at periodic cycles >> To generate the INTTB0 interrupt, specify a time interval in the TB0RG1 timer register.
7 TB0CR TB0RUN IMC5 1 0 X X X X TB0FFCR TB0MOD TB0RG1L TB0RG1H TB0RUN 6 0 0 1 - - 5 X 0 1 - - - 0 1 * * 0 4 0 0 0 0 0 0 0 * * 0 3 - X X X X 0 0 * * - 2 0 1 - - - 0 1 * * 1 1 X 0 - - - - * * * X 0 Starts the TMRB0 module. Stops TMRB0. Enables INTTB0, and sets it to level 4. (Setting of INTTB0 only is shown here. This is a 32-bit register and requires settings of other interrupts as well.) Disables the trigger. Designates the prescaler output clock as the input clock, and specifies the time interval. (16 bits) Starts TMRB0. 0 0 - - - - * * * 1 XXXXX
- XX XX * * 0 * * 0
X; Don't care -; no change
11.4.2
16-bit Event Counter Mode
<> The up-counter counts up on the rising edge of TB0IN0 pin input. By capturing a value using software and reading the captured value, it is possible to read the count value.
7 TB0CR TB0RUN PACR PAFC IMC5 1 0 - - X X X X TB0FFCR TB0MOD TB0RUN X X 0 6 0 0 - - 1 - - - X X 0 5 X 0 - - 1 - - - 0 1 0 4 0 - - 0 0 0 0 0 0 0 3 - - - X X X X 0 0 - 2 0 - - 1 - - - 0 1 1 1 X - - 0 - - - - 0 X 0 X 0 0 1 0 - - - - 0 1 Starts the TMRB0 module. Stops TMRB0. Sets P20 to the input mode. Enables INTTB0, and sets it to level 4. (Setting of INTTB0 only is shown here. This is a 32bit register and requires settings of other interrupts as well.) Disables the trigger. Designates the TB0IN0 pin input as the input clock. Starts TMRB0. XXXX
TB0MOD TB0CP0L TB0CP0H
X * *
X * *
0 * *
0 * *
0 * *
1 * *
0 * *
0 * *
Captures a value using software. Reads the count value of low-order 8 bits. Reads the counter value of high-order 8 bits.
X; Don't care -; no change To be used as the event counter, put the prescaler in a "RUN" state (TB0RUN = "1").
TMP19A64(rev1.1)-11-15
TMP19A64C1D
11.4.3
16-bit PPG (Programmable Square Wave) Output Mode
Square waves with any frequency and any duty (programmable square waves) can be output. The output pulse can be either low-active or high-active. Programmable square waves can be output from the TB0OUT pin by triggering the timer flip-flop (TB0FF) to reverse when the set value of the up-counter matches the set values of the timer registers (TB0RG0H/L and TB0RG1H/L). Note that the set values of TB0RG0H/L and TB0RG1H/L must satisfy the following requirement: (Set value of TB0RG0H/L) < (Set value of TB0RG1H/L)
Match with TB0RG0H/L (INTTB0 interrupt) Match with TB0RG1H/L (INTTB0 interrupt) TB0OUT pin
Fig. 11.4.3.1 Example of Output of Programmable Square Wave (PPG) In this mode, by enabling the double buffering of TB0RG0H/L, the value of register buffer 0 is shifted into TB0RG0H/L when the set value of the up-counter matches the set value of TB0RG1H/L. This facilitates handling of small duties.
Match with TB0RG0 Match with TB0RG1 TB0RG0 (compare value) Register buffer
Up-counter = Q1
Up-counter = Q2 Trigger to shift to TB0RG1
Q1 Q2
Q2 Q3 Write TB0RG0
Fig. 11.4.3.2 Register Buffer Operation
TMP19A64(rev1.1)-11-16
TMP19A64C1D
The block diagram of the 16-bit PPG (programmable square wave) output mode is shown below.
TB0RUN TB0OUT (PPG output) 16-bit up-counter UC0 Clear F/F (TB0FF0)
TB0IN0 T1 T4 T16
Selector
16-bit comparator
Match
16-bit comparator
Selector
TB0RG0
TB0RG0-WR TB0RUN Register buffer 0 TB0RG1
Internal data bus
Fig. 11.4.3.3 Block Diagram of 16-bit PPG Mode
<< Example of setting of each register in the 16-bit PPG output mode >>
7 TB0CR TB0RUN TB0RG0L TB0RG0H TB0RG1L TB0RG1H TB0RUN 1 0 * * * * 1 6 0 0 * * * * 0 5 X 0 * * * * 0 4 0 * * * * 0 3 - * * * * - 2 0 * * * * 0 1 X X * * * * X 0 X 0 * * * * 0 Enables the TB0RG0 double buffering. (Changes the duty/cycle when the INTTB0 interrupt is generated) Specifies to trigger TB0FF0 to reverse when a match with TB0RG0 or TB0RG1 is detected, and sets the initial value of TB0FF0 to "0." Designates the prescaler output clock as the input clock, and disables the capture function. Assigns PA2 to TB0OUT. Specifies a cycle. (16 bits) Starts the TMRB0 module. Disables the TB0RG0 double buffering and stops TMRB0. Specifies a duty. (16 bits)
XXX
TB0FFCR
XX XX - - 1 - - 0
0
0
1
1
1
0
TB0MOD PACR PAFC TB0RUN
1 - - 0
0 - - 0
0
1
*
*
(** = 01, 10, 11) -1-- - - 1 1 - X - 1
Starts TMRB0.
X; Don't care -; no change
TMP19A64(rev1.1)-11-17
TMP19A64C1D
11.4.4
Applications using the Capture Function
The capture function can be used to develop many applications, including those described below: One-shot pulse output triggered by an external pulse Frequency measurement Pulse width measurement Time difference measurement One-shot pulse output triggered by an external pulse One-shot pulse output triggered by an external pulse is carried out as follows: The 16-bit up-counter (UC0) is made to count up by putting it in a free-running state using the prescaler output clock. An external pulse is input through the TB0IN0 pin. A trigger is generated at the rising of the external pulse by using the capture function and the value of the up-counter is taken into the capture registers (TB0CP0H/L). The INTC must be programmed so that an interrupt INT5 is generated at the rising of an external trigger pulse. This interrupt is used to set the timer registers (TB0RG0H/L) to the sum of the TB0CP0H/L value (c) and the delay time (d), (c + d), and set the timer registers (TB0RG1H/L) to the sum of the TB0RG0H/L values and the pulse width (p) of one-shot pulse, (c + d + p). In addition, the timer flip-flop control registers (TB0FFCR) must be set to "11." This enables triggering the timer flip-flop (TB0FF0) to reverse when UC0 matches TB0RG0H/L and TB6RG1H/L. This trigger is disabled by the INTTB0 interrupt after a one-shot pulse is output. Symbols (c), (d) and (p) used in the text correspond to symbols c, d and p in Fig. 11.4.4.1.
Put the counter in a free-running state Count clock (Internal clock) TB0IN0 pin input (External trigger pulse)
c
c+d
c+d+p
Taking data into the capture register (CAP1) INT5 generation INTTB0 generation
Match with TB0RG0H/L Enable reverse Match with TB0RG1H/L Disable reverse when data is taken into CAP1 Timer output TB0OUTpin Delay time (d) Pulse width (p) Enable reverse INTTB0 generation
Fig. 11.4.4.1 One-shot Pulse Output (With Delay)
TMP19A64(rev1.1)-11-18
TMP19A64C1D
Programming example: Output a 2-ms one-shot pulse triggered by an external pulse from the TB0IN0 pin with a 3-ms delay
* Clock condition System clock : High speed (fc) High-speed clock gear : 1X (fc) Prescaler clock : fperiph/4 (fperiph fsys)
Main programming
7 TB0CR TB0MOD TB0FFCR 1 X X 6 0 X X 5 X 1 0 4 X 0 0 3 X 1 0 2 X 0 0 1 X 0 1 0 X 1 0
Starts the TMRB0 module. Puts to a free-running state. Uses T1 for counting. Takes data into TB0CP0 at the rising of TB0IN0 input Clears TB0FF0 to zero Disables TB0FF0 to reverse
PACR PAFC IMC1

IMC5
- - X X X X X X X X -
- - - 1 - - 1 - - - 0
- - - 1 - - 1 - - - 0
TB0RUN
- - 0 0 0 0 0 0 0 0 0
- - X X X X X X X X -
1 1 - 1 - - 0 - - - 1
- - - 0 - - 0 - - - X
- - - 0 - - 0 - - - 1
Assigns PA2 pin to TB0OUT Enables INT5 These are 32-bit registers and must be all processed.
Disables INTTB0 These are 32-bit registers and must be all processed. Starts the TMRB0 module.
INT0 programming
TB0RG0L TB0RG0H TB0RG1L TB0RG1H TB0FFCR * * * * X * * * * X * * * * - * * * * - * * * * 1 * * * * 1 * * * * - * * * * -
TB0CP0 + 3ms/T1 TB0RG0 + 2ms/T1 Enables TB0FF0 to reverse when there is a match with TB0RG0, 1
IMC5
X X X X
1 - - -
1 - - -
0 0 0 0
X X X X
1 - - -
0 - - -
0 - - -
Enables INTTB0
INTTB0 programming
TB0FFCR X X - - 0 0 - -
Disables TB0FF0 to reverse when there is a match with TB0RG0, 1
IMC5 X X X X 1 - - - 1 - - - 0 0 0 0 X X X X 0 - - - 0 - - - 0 - - -
Disables INTTB0
X; Don't care ;no change If a delay is not required, TB0FF0 is reversed when data is taken into TB0CP0H/L, and TB0RG1L/H is set to the sum of the TB0CP0H/L value (c) and the one-shot pulse width (p), (c + p), by generating the INT5 interrupt. TB0FF0 is enabled to reverse when UC0 matches with TB0RG1L/H, and is disabled by generating the INTTB0 interrupt.
TMP19A64(rev1.1)-11-19
TMP19A64C1D
Count clock (Prescaler output clock) c TB0IN0 input (External trigger pulse)
c+p
Taking data into the capture register TB0CP0 INT5 generation
INTTB0 generation Match with TB0RG1L/H Enable reverse Timer output TB0OUT pin Pulse width Enable reverse when data is taken into TB0CP0H/L (p)
Taking data into the capture register TB0CP1H/L
Disable reverse when data is taken into TB0CP1H/L
Fig. 11.4.4.2 One-shot Pulse Output Triggered by an External Pulse (Without Delay) Frequency measurement By using the capture function, the frequency of an external clock can be measured. To measure frequency, another 16-bit timer (TMRB3) is used in combination with the 16-bit event counter mode (TMRB3 reverses TB3FFCR to specify the measurement time). The TB0IN0 pin input is selected as the TMRB0 count clock to perform the count operation using an external input clock. TB0MOD is set to "11." This setting allows a count value of the 16-bit UC0 up-counter to be taken into the capture register (TB0CP0) upon the rising of a timer flip-flop (TB3FFCR) of the 16-bit timer (TMRB3), and an UC0 counter value to be taken into the capture register (TB0CP1H/L) upon the falling of TB3FF of the 16-bit timer (TMRB3). A frequency is then obtained from the difference between TB0CP0H/L and TB0CP1H/L based on the measurement, by generating the INTTB3 16-bit timer interrupt.
Count clock (TB0IN0 pin input) TB3OUT Taking data into TB0CP0H/L Taking data into TB0CP1H/L INTTB3 C1 C2 C1 C2
C1
C2
Fig. 11.4.4.3 Frequency Measurement For example, if the set width of TB3FF level "1" of the 16-bit timer is 0.5 s and if the difference between TB0CP0H/L and TB0CP1H/L is 100, the frequency is 100 / 0.5 s = 200 Hz.
TMP19A64(rev1.1)-11-20
TMP19A64C1D
Pulse width measurement By using the capture function, the "H" level width of an external pulse can be measured. Specifically, an external pulse is input through the TB0IN0 pin and the up-counter (UC0) is made to count up by putting it in a free-running state using the prescaler output clock. A trigger is generated at each rising and falling edge of the external pulse by using the capture function and the value of the up-counter is taken into the capture registers (TB0CP0H/L, TB0CP1H/L). The INTC must be programmed so that INT5 is generated at the falling edge of an external pulse input through the TB0IN0 pin. The "H" level pulse width can be calculated by multiplying the difference between TB0CP0H/L and TB0CP1H/L by the clock cycle of an internal clock. For example, if the difference between TB0CP0H/L and TB0CP1H/L is 100 and the cycle of the prescaler output clock is 0.5 s, the "H" level pulse width is 100 x 0.5 s = 50 s. Caution must be exercised when measuring pulse widths exceeding the UC0 maximum count time which is dependant upon the source clock used. The measurement of such pulse widths must be made using software.
Prescaler output clock C1 TB0IN0 pin input (External pulse) Taking data into TB0CP0H/L Taking data into TB0CP1H/L INT5 C2
C1 C2
C1 C2
Fig. 11.4.4.4 Pulse Width Measurement The "L" level width of an external pulse can also be measured. In such cases, the difference between C2 generated the first time and C1 generated the second time is initially obtained by performing the second stage of INT5 interrupt processing as shown in Fig. 11.4.4.5 and this difference is multiplied by the cycle of the prescaler output clock to obtain the "L" level width.
TMP19A64(rev1.1)-11-21
TMP19A64C1D
Time Difference Measurement By using the capture function, the time difference between two events can be measured. Specifically, the up-counter (UC0) is made to count up by putting it in a free-running state using the prescaler output clock. The value of UC0 is taken into the capture register (TB0CP0H/L) at the rising edge of the TB0IN0 pin input pulse. The INTC must be programmed to generate INT5 interrupt at this time. The value of UC0 is taken into the capture register TB0CP1H/L at the rising edge of the TB0IN1 pin input pulse. The INTC must be programmed to generate INT6 interrupt at this time. The time difference can be calculated by multiplying the difference between TB0CP1H/L and TB0CP0H/L by the clock cycle of an internal clock.
Prescaler output clock C1 TB0IN0 pin input TB0IN1 pin input
Taking data into TB0CP0H/L
C2
Taking data into TB0CP1H/L
INT5 INT6 Time difference
Fig. 11.4.4.5 Time Difference Measurement
TMP19A64(rev1.1)-11-22
TMP19A64C1D
11.4.5
Two-phase Pulse Input Count Mode (TMRBA)
In this mode, the counter is incremented or decremented by one depending on the state transition of the two-phase clock that is input through TBAIN0 and TBAIN1 and has phase difference. An interrupt is output when a counter overflow or underflow occurs in the up-and-down counter mode, and when the counting operation is executed. This is the multiplication-by-4 mode in which the counter counts up/down at each count. UC0
UP UPINT
or T/4
+
- INT
DOWN DOWNINT INT
(Lead clear) SET
Internal bus
Fig. 11.4.5.1 Count Circuit of Two-phase Counter
11.4.6
Multiplication-by-4 Mode
UP 1 TBAIN0 1 0 0 1 DOWN
1
0
0
1
1
1 TBAIN1 0
0 2
0 3
1 1
1 0
1
1
0
0
1
0
1
3
2
0
Count up at each edge Pin state Count condition TBAIN0,TBAIN1 0 2 3 1 UP 2 3 1 0 0 1 3 2
Count down at each edge
DOWN 1 3 2 0
TMP19A64(rev1.1)-11-23
TMP19A64C1D
TMRBA RUN register (TBARUN)
7
TBARUN (0xFFFF_F1E0) bit Symbol Read/Write After reset Function TBARDE R/W 0 Double Buffer 0: Disable 1: Enable
6
R/W 0 Write "0."
5
UDACK R/W 0 Select sampling clock 0:fs 1: T0/4
4
3
2
1
0
TBARUN R/W 0
TBAUDCE I2TBA R/W R/W 0 0 IDLE Enable/ 0: Stop disable two-phase 1: Operate counter 0: Disable 1: Enable
TBAPRUN R/W R 0 0 Timer Run/Stop Control 0: Stop & Clear 1: Run (Count Up)
Fig. 11.4.6.1 Two-phase Pulse Input Count Mode Setting Register For the sampling clock, the fifth bit of the TBARUN register is set to "1." << Recovery from the SLEEP mode >> The two-phase counter counts up or down depending on the SLEEP release input state. Operation mode Register setting determines whether the external input signals from the TBAIN0 and TBAIN1 input pins are input to the normal 16-bit timer (capture input) or the up-and-down counter. * * * In the up-and-down counter mode, capture is executed by the software only. Capture at the external clock timing does not work. In the up-and-down counter mode, the comparator is disabled and it does not execute comparison with timer registers. The input clock sampling is executed by fs (32 KHz) or the high-speed clock (system clock). The maximum input frequency is 4 kHz for fs and T0/4 [Hz] for the high-speed clock.
<< How to program the up-and-down counter >> Set the TBAMOD register to "00" (prescaler OFF). Then, program the fourth bit of the TBARUN register to determine whether to operate the counter as the up-and-down counter or as the conventional up-counter for external clock input. TBAUDCE (Enable the up-and-down counter) = "0": Normal 16-bit timer operation = "1": Up-and-down counter operation
TMP19A64(rev1.1)-11-24
TMP19A64C1D
Interrupt In the NORMAL or SLOW mode The INTTBA interrupt is generated by counting up or down. Reading the status register TBAST during interrupt handling allows simultaneous check for occurrences of an overflow and an underflow. If TBAST is "1," it indicates that an overflow has occurred. If is "1," it indicates that an underflow has occurred. This register is cleared after it is read. The counter becomes 0x0000 when an overflow occurs, and it becomes 0xFFFF when an underflow occurs. After that, the counter continues the counting operation.
7
bit Symbol TBAST (0xFFFF_F1E4) Read/Write After reset Function
6
5
4
INTTBUDA
3
INTTBUDF A
2
INTTBOUF A
1
0
R 0 This can be read as "0."
0
Up-anddown count 0: Not occurred
1: Occurred
R 0
Underflow 0: Not occurred
1: Occurred
0
Overflow 0: Not occurred
1: Occurred
R 0 This can be read as "0."
Fig. 11.4.6.2 TMRBA Status Register Note: The status is cleared after the register is read.
In the SLEEP mode The INTTBA interrupt is enabled using the interrupt controller (INTC). The INTTBA interrupt is generated by the count-up or count-down input, and the system recovers from the SLEEP mode. Reading the status register TBAST during interrupt handling allows simultaneous check for occurrences of an overflow and an underflow
TMP19A64(rev1.1)-11-25
TMP19A64C1D
Up-and-down counter When the two-phase input count mode is selected (TBARUN = "1"), the up-counter becomes the up-and-down counter and it is initialized to 0x7FFF. If a counter overflow occurs, the counter returns to 0x0000. If a counter underflow occurs, the counter returns to 0xFFFF. After that, the counter continues the counting operation. Therefore, the state can be checked by reading the counter value and the status flag TBAST after an interrupt is generated.
Sampling clock Up-count input 0x3FFF 0x4000 0x4001
Up-and-down counter value
Up-and-down interrupt
(Note 1) The up (down) count input must be set to the "H" level for the states before and after an input. (Note 2) Reading of counter value must be executed during INTTBA interrupt handling
TMP19A64(rev1.1)-11-26
TMP19A64C1D
12. 32-bit Input Capture (TMRC)
TMRC consists of one channel with a 32-bit time base timer (TBT), four channels (TCCAP0 through TCCAP3) each with a 32-bit input capture register, and ten channels (TCCMP0 through TCCMP9) each with a 32-bit compare register. Fig. 12-1 shows the TMRC block diagram.
Prescaler input clock (T0)
2
4
8
16
32
64
128 256 512
RUN & Clear
T2
T4
T8
T16 T32
T64
T128 T256
TBTCR
TBTIN (PF7)
Noise removal circuit
Clear & count control circuit
32-bit time base timer (TBT)
Overflow interrupt (INTTBT)
Prescaler output T2 through T256
Capture registers 0 through 3 (TCCAP0 through TCCAP3) CAP0CR
CAP0CR Edge detection 32-bit input capture (TCCAP0) Capture 0 interrupt (INTCAP0)
TC0IN (PG0)
Noise removal circuit
Compare registers 0 through 9 (TCCMP0 through TCCMP9) 32-bit comparator Compare match interrupt 0 (INTCMP0) (INTCAPA) Compare match trigger (CMP0TRG) Compare match output (TCOUT0)
32-bit register buffer 0
32-bit compare register 0 (TCCMP0)
Fig. 12.1 Timer C Block Diagram
TMP19A64(rev1.1) 12-1
TMP19A64C1D
12.1 Description for Operations of Each Circuit
12.2.1 Prescaler
The prescaler is provided to acquire the TMRC source clock. The prescaler input clock T0 is fperiph/2, fperiph/4, fperiph/8 or fperiph/16 selected by SYSCR0 in the CG. T2 through T256 generated by dividing T0 are available as TMRC prescaler input clocks and can be selected with TBTCR. Fperiph is either "fgear" which is a clock selected by SYSCR1 in the CG, or "fc" which is a clock before it is divided by the clock gear. The operation or stoppage of the prescaler is set with TBTRUN where writing "1" starts counting and writing "0" clears and stops counting. Table 12-1 shows the prescaler output clock resolutions.
TMP19A64(rev1.1) 12-2
TMP19A64C1D
Table 12.1 Prescaler Output Clock Resolutions (if any of high-speed clock gears 8/8, 4/8, 2/8 and 1/8 is selected)
@fc = 54MHz Select peripheral clock Clock Select prescaler gear value clock

Prescaler output clock resolution
00(fperiph/16) 000(fc) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 100(fc/2) 0(fgear) 110(fc/4) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 111(fc/8) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 000(fc) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 100(fc/2) 1(fc) 110(fc/4) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 111(fc/8) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2)
T2 fc/2 (1.19 s)
6
T4 fc/2 (2.37 s)
7
T8 fc/2 (4.74 s)
8
T16 fc/2 (9.48 s)
9
fc/25(0.59 s) fc/24(0.30 s) fc/2 (0.15 s)
3
fc/26(1.19 s) fc/25(0.59 s) fc/2 (0.30 s)
4
fc/27(2.37 s) fc/26(1.19 s) fc/2 (0.59 s)
5
fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/210(18.96 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/211(37.93 s) fc/210(18.96 s) fc/29(9.48 s) fc/28(4.74 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/29(9.48 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s) fc/29(9.48 s) fc/28(4.74 s) fc/27(2.37 s) fc/26(1.19 s)
fc/27(2.37 s) fc/2 (1.19 s)
6
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/25(0.59 s) fc/2 (0.30 s)
4
fc/26(1.19 s) fc/2 (0.59 s)
5
fc/27(2.37 s) fc/2 (1.19 s)
6
fc/28(4.74 s) fc/2 (2.z/37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/26(1.19 s) fc/2 (0.59 s)
5
fc/27(2.37 s) fc/2 (1.19 s)
6
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/27(2.37 s) fc/2 (1.19 s)
6
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/26(1.19 s) fc/2 (0.59 s)
5 4
fc/27(2.37 s) fc/2 (1.19 s)
6 5
fc/28(4.74 s) fc/2 (2.37 s)
7 6
fc/2 (0.30 s) fc/23(0.15 s) fc/26(1.19 s) fc/2 (0.59 s)
5 4
fc/2 (0.59 s) fc/24(0.30 s) fc/27(2.37 s) fc/2 (1.19 s)
6 5
fc/2 (1.19 s) fc/25(0.59 s) fc/28(4.74 s) fc/2 (2.37 s)
7 6
fc/2 (0.30 s) fc/23(0.15 s) fc/26(1.19 s) fc/2 (0.59 s)
5 4
fc/2 (0.59 s) fc/24(0.30 s) fc/27(2.37 s) fc/2 (1.19 s)
6 5
fc/2 (1.19 s) fc/25(0.59 s) fc/28(4.74 s) fc/2 (2.37 s)
7 6
fc/2 (0.30 s) fc/2 (1.19 s)
6
fc/2 (0.59 s) fc/24(0.30 s) fc/2 (2.37 s)
7
fc/2 (1.19 s) fc/25(0.59 s) fc/2 (4.74 s)
8
fc/25(0.59 s)
fc/26(1.19 s) fc/2 (0.59 s)
5
fc/27(2.37 s) fc/2 (1.19 s)
6
fc/25(0.59 s)
TMP19A64(rev1.1) 12-3
TMP19A64C1D
@fc = 54MHz Select peripheral clock Select prescaler Clock gear value clock

Prescaler output clock resolution
T32 00(fperiph/16) 000(fc) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 100(fc/2) 0(fgear) 110(fc/4) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 111(fc/8) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 000(fc) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 100(fc/2) 1(fc) 110(fc/4) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 111(fc/8) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) fc/2 (18.96 s)
10 11
T64 fc/2 (37.93 s) fc/210(18.96 s) fc/29(9.48 s) fc/2 (4.74 s)
8 12
T128 fc/2 (75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/2 (9.48 s)
9 13
T256 fc/2 (151.7 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/214(303.4 s) fc/213(151.7 s) fc/212(75.85 s) fc/211(37.93 s) fc/215(606.8 s) fc/214(303.4 s) fc/213(151.7 s) fc/212(75.85 s) fc/216(1213.6 s) fc/215(606.8 s) fc/214(303.4 s) fc/213(151.7 s) fc/213(151.7 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/213(151.7 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/213(151.7 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s) fc/213(151.7 s) fc/212(75.85 s) fc/211(37.93 s) fc/210(18.96 s)
fc/29(9.48 s) fc/28(4.74 s) fc/2 (2.37 s)
7
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/213(151.7 s) fc/2 (75.85 s)
12
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/213(151.7 s) fc/2 (75.85 s)
12
fc/214(303.4 s) fc/2 (151.7 s)
13
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/213(151.7 s) fc/2 (75.85 s)
12
fc/214(303.4 s) fc/2 (151.7 s)
13
fc/215(606.8 s) fc/2 (303.4 s)
14
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/213(151.7 s) fc/2 (75.85 s)
12
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/210(18.96 s) fc/2 (9.48 s)
9
fc/211(37.93 s) fc/2 (18.96 s)
10
fc/212(75.85 s) fc/2 (37.93 s)
11
fc/28(4.74 s) fc/2 (2.37 s)
7
fc/29(9.48 s) fc/2 (4.74 s)
8
fc/210(18.96 s) fc/2 (9.48 s)
9
(Note 1) The prescaler output clock Tn must be selected so that TnTMP19A64(rev1.1) 12-4
TMP19A64C1D
12.2.2
Noise Removal Circuit
The noise removal circuit removes noises from an external clock source input (TBTIN) and a capture trigger input (TcnIN) of the time base timer (TBT). It can also output input signals without removing noises from them.
12.2.3
32-bit Time Base Timer (TBT)
This is a 32-bit binary counter that counts up upon the rising of an input clock specified by the TBT control register TBTCR of the time base timer. Based on the TBTCR setting, an input clock is selected from external clocks supplied through the TBTIN pin and eight prescaler output clocks T2T4T8T16T32T64T128 and T256. "Count," "stop" or "clear" of the up-counter can be selected with TBTRUN. When a reset is performed, the up-counter is in a cleared state and the timer is in an idle state. As counting starts, the upcounter operates in a free-running condition. As it reaches an overflow state, the overflow interrupt INTTBT is generated; subsequently, the count value is cleared to 0 and the up-counter restarts a count-up operation. INTTBT is controlled by the TCGST and TCGIM that are grouped in the same way as INTCAP0 through INTCAP3 are (see the explanation about the 32-bit capture register). This counter can perform a read capture operation. When it is performing a read capture operation, it is possible to read a counter value by accessing the TBT read capture register (TBTRDCAP) in units of 32 bits. However, a counter value cannot be read (captured) if the register is accessed in units of 8 or 16 bits.
TMP19A64(rev1.1) 12-5
TMP19A64C1D
12.2.4
Edge Detection Circuit
By performing sampling, this circuit detects the input edge of an external capture input (TcnIN). It can be set to "rising edge," "falling edge," "both edges" or "not capture" by provisioning the capture control register CAPnCR. Fig. 12.2.4.1 shows capture inputs, outputs (capture factor outputs) produced by the edge detection circuit, and specific detection circuit settings.
TCnIN input
Capture factor (Rising edge setting) (Falling edge setting)
(Both-edge setting)
(Not capture setting)
Fig. 12.2.4.1 Capture Inputs and Capture Factor Outputs (Outputs Produced by the Edge Detection Circuit)
12.2.5
32-bit Capture Register
This is a 32-bit register for capturing count values of the time base timer by using capture factors as triggers. If a capture operation is performed, the capture interrupt INTCAPn is generated. Four interrupt requests INTCAP0 through INTCAP3 are grouped into one set of interrupt requests which are then notified to the interrupt controller. Which one of interrupt requests INTCAP0 through INTCAP3 must be processed can be identified by reading the status register TCGST during interrupt processing. Additionally, it is possible to mask unnecessary interrupts by setting the interrupt mask register TCGIM to an appropriate bit setting. While a read of the capture register is ongoing, count values cannot be captured even if there are triggers.
TMP19A64(rev1.1) 12-6
TMP19A64C1D
12.2.6
32-bit Compare Register
This is a 32-bit register for specifying a compare value. TMRC has ten built-in compare registers, TCCMP0 through TCCMP9. If values set in these compare registers match the value of the time base timer TBT, the match detection signal of a comparator becomes active. "Compare enable" or "compare disable" can be specified with the compare control register CMPCTL. To set TCCMPn to a specific value, data must be transferred to TCCMPn in the order of lower to higher bits by using a byte data transfer instruction. If a byte data transfer instruction is used, data is transferred four times to TCCMPn. Each compare register has a double-buffer structure, that is, TCCMPn forms a pair with a register buffer "n." "Enable" or "disable" of the double buffers is controlled by the compare control register CMPCTL . If is set to "0," the double buffers are disabled. If is set to "1," they are enabled. If the double buffers are enabled, data transfer from the register buffer "n" to the compare register TCCMPn takes place when the value of TBT matches that of TCCMPn. Because TCCMPn is indeterminate when a reset is performed, it is necessary to prepare and write data in advance. A reset initializes CMPCTL to "0" and disables the double buffers. To use the double buffers, data must be written to the compare register, must be set to "1," and then the following data must be written to the register buffer. TCCMPn and the register buffer are assigned to the same address. If is "0," the same value is written to TCCMPn and each register buffer. If is "1," data is written to each register buffer only. Therefore, to write an initial value to the compare register, it is necessary to set the double buffers to "disable."
TMP19A64(rev1.1) 12-7
TMP19A64C1D
12.3 Register Description
TMRC Control Register 7
TCCR (FFFFF400H) bit Symbol Read/Write After reset 0
TMRC operation
6
I2TBT R/W 0 IDLE 0: Stop 1: Run
5
4
3
R
2
1
0
TCEN
0
0
0
0
0
0
Function
0: Disable 1: Enable
: :
Controls the operation in IDLE mode Specifies enabling/disabling of the TMRC operation. If set to "disable," a clock is not supplied to other registers of the TMRC module and, therefore, a reduction in power consumption is possible (a read of or a write to other registers cannot be executed). To use TMRC, the TMRC operation must be set to "enable" ("1") before making individual register settings of TMRC modules. If TMRC is operated and then set to "disable," individual register settings are retained. Values read from bits 0 through 5 of TCCR are all "0."
(Note)
TBTRUN Register 7
TBTRUN (FFFFF401H) bit Symbol Read/Write After reset 0 0 R 0 0 0 Ensure this is set to "0." 0
6
5
4
3
2
TBTCAP R/W
1
TBTPRUN
0
TBTRUN 0
0
Function
TBT counter Timer Run/Stop Control software 0: Stop & clear capture 0: Don't 1: Count Care 1: Software capture
: Controls the TBT count operation : Controls the TBT prescaler operation : If this is set to "1," the count value of the time base timer (TBT) is taken into the capture register TBTCAPn. (Note) Values read from bits 4 through 7 of TBTRUN are all "0."
Fig. 12.3.1 TMRC-related Registers
TMP19A64(rev1.1) 12-8
TMP19A64C1D
TBT Control Register 7
TBTCR (FFFFF402H) bit Symbol Read/Write After reset 0
TBTIN Input noise
6
5
4
R/W
3
TBTCLK3
2
TBTCLK2 0
1
TBTCLK1 0
0
TBTCLK0 0
TBTNF 0 0 0
0
TBT source clock
Ensure this is set to "0."
Function
removal 0: Disable 1: Enable
0000: T2 0001: T4 0010: T8 0011: T16 0100: T32 0101: T64 0110: T128 0111: T256 1111: TBTIN pin input
: This is an input clock for TBT. Clocks from "0000" to "0111" are available as prescaler output clocks. A clock "1111" is input through the TBTIN pin. : Controls the noise removal for the TBTIN pin input. If this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54MHz) is accepted as a source clock for TBT, at whichever level the TBTIN pin is, "H" or "L." If this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54MHz) is regarded as noise and removed, at whichever level the TBTIN pin is, "H" or "L." The range of removal changes depending on the selected clock gear and a system clock used.
TBT Capture Register (TBTCAP) 7
TBTCAP0 bit Symbol (FFFFF404H) Read/Write After reset Function CAP07 0
6
CAP06 0
5
CAP05 0
4
CAP04 R 0
3
CAP03 0
2
CAP02 0
1
CAP01 0
0
CAP00 0
Capture data (bits 7 through 0)
7
TBTCAP1 bit Symbol (FFFFF405H) Read/Write After reset Function CAP15 0
6
CAP14 0
5
CAP13 0
4
CAP12 R 0
3
CAP11 0
2
CAP10 0
1
CAP09 0
0
CAP08 0
Capture data (bits 15 through 8)
7
TBTCAP2 bit Symbol (FFFFF406H) Read/Write After reset Function CAP23 0
6
CAP22 0
5
CAP21 0
4
CAP20 R 0
3
CAP19 0
2
CAP18 0
1
CAP17 0
0
CAP16 0
Capture data (bits 23 through 16)
7
TBTCAP3 bit Symbol (FFFFF407H) Read/Write After reset Function CAP31 0
6
CAP30 0
5
CAP29 0
4
CAP28 R 0
3
CAP27 0
2
CAP26 0
1
CAP25 0
0
CAP24 0
Capture data (bits 31 through 24)
Fig. 12.3.2 TMRC-related Registers
TMP19A64(rev1.1) 12-9
TMP19A64C1D
TBT Capture Register (TBTRDCAP) 7
TBTRDCAP0 bit Symbol (FFFFF408H) Read/Write After reset Function
6
5
4
R
3
2
1
0
RDCAP07 RDCAP06 RDCAP05 RDCAP04 RDCAP03 RDCAP02 RDCAP01 RDCAP00 0 0 0 0 0 0 0 0
Capture data (bits 7 through 0)
7
TBTRDCAP1 bit Symbol (FFFFF409H) Read/Write After reset Function
6
5
4
R
3
2
1
0
RDCAP17 RDCAP16 RDCAP15 RDCAP14 RDCAP13 RDCAP12 RDCAP11 RDCAP10 0 0 0 0 0 0 0 0
Capture data (bits 15 through 8)
7
TBTRDCAP2 bit Symbol (FFFFF40AH) Read/Write After reset Function
6
5
4
R
3
2
1
0
RDCAP27 RDCAP26 RDCAP25 RDCAP24 RDCAP23 RDCAP22 RDCAP21 RDCAP20 0 0 0 0 0 0 0 0
Capture data (bits 23 through 16)
7
TBTRDCAP3 bit Symbol (FFFFF40BH) Read/Write After reset Function
6
5
4
R
3
2
1
0
RDCAP37 RDCAP36 RDCAP35 RDCAP34 RDCAP33 RDCAP32 RDCAP31 RDCAP30 0 0 0 0 0 0 0 0
Capture data (bits 31 through 24)
Fig. 12.3.3 TMRC-related Registers
TMP19A64(rev1.1) 12-10
TMP19A64C1D
TMRC Capture 0 Control Register 7
CAP0CR bit Symbol (FFFFF410H) Read/Write After reset TC0NF R/W 0
TC0IN Input noise
6
5
4
R
3
2
1
CP0EG1 R/W
0
CP0EG0 0
0
0
0
0
0
0
TC0IN input 00: Not capture 01: Rising edge 10: Falling edge 11: Both edges
Select effective edge of
Function
removal 0: Disable 1: Enable
: :
Selects the effective edge of an input to the trigger input pin TC0IN of the capture 0 register (TCCAP0). If this is set to "00," the capture operation is disabled. Controls the noise removal for the TC0IN pin input. If this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54MHz) is accepted as a trigger input for TCCAP0, at whichever level the TC0IN pin is, "H" or "L." If this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54MHz) is regarded as noise and removed, at whichever level the TC0IN pin is, "H" or "L." The range of removal changes depending on the selected clock gear and a system clock used.
(Note)
Values read from bits 2 through 6 of CAPOCR are all "0."
TMRC Capture 0 Register (TCCAP0) 7 6
CAP006 0
5
CAP005 0
4
CAP004 R 0
3
CAP003 0
2
CAP002 0
1
CAP001 0
0
CAP000 0
TCCAP0LL bit Symbol (FFFFF414H) Read/Write After reset Function
CAP007 0
Capture 0 data (bits 7 through 0)
7
TCCAP0LH bit Symbol (FFFFF415H) Read/Write After reset Function CAP017 0
6
CAP016 0
5
CAP015 0
4
CAP014 R 0
3
CAP013 0
2
CAP012 0
1
CAP011 0
0
CAP010 0
Capture 0 data (bits 15 through 8)
7
TCCAP0HL bit Symbol (FFFFF416H) Read/Write After reset Function CAP027 0
6
CAP026 0
5
CAP025 0
4
CAP024 R 0
3
CAP023 0
2
CAP022 0
1
CAP021 0
0
CAP020 0
Capture 0 data (bits 23 through 16)
7
TCCAP0HH bit Symbol (FFFFF417H) Read/Write After reset Function CAP037 0
6
CAP036 0
5
CAP035 0
4
CAP034 R 0
3
CAP033 0
2
CAP032 0
1
CAP031 0
0
CAP030 0
Capture 0 data (bits 31 through 24)
(Note)
Data is not captured during a read of the capture register. Fig. 12.3.4 TMRC-related Registers TMP19A64(rev1.1) 12-11
TMP19A64C1D
TMRC Capture 1 Control Register 7
CAP1CR bit Symbol (FFFFF418H) Read/Write After reset TC1NF R/W 0
TC1IN Input noise
6
5
4
R
3
2
1
CP1EG1 R/W
0
CP1EG0 0
0
0
0
0
0
0
TC1IN input 00: Not capture 01: Rising edge 10: Falling edge 11: Both edges
Select effective edge of
Function
removal 0: Disable 1: Enable
: :
Selects the effective edge of an input to the trigger input pin TC1IN of the capture 1 register (TCCAP1). If this is set to "00," the capture operation is disabled. Controls the noise removal for the TC1NF pin input. If this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54MHz) is accepted as a trigger input for TCCAP1, at whichever level TC1IN pin is, "H" or "L." If this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54MHz) is regarded as noise and removed, at whichever level the TC1IN pin is, "H" or "L." The range of removal changes depending on the selected clock gear and a system clock used.
(Note)
Values read from bits 2 through 6 of CAP1CR are all "0."
TMRC Capture 1 Register (TCCAP1) 7 6
CAP106 0
5
CAP105 0
4
CAP104 R 0
3
CAP103 0
2
CAP102 0
1
CAP101 0
0
CAP100 0
TCCAP1LL bit Symbol (FFFFF41CH) Read/Write After reset Function
CAP107 0
Capture 1 data (bits 7 through 0)
7
TCCAP1LH bit Symbol (FFFFF41DH) Read/Write After reset Function CAP117 0
6
CAP116 0
5
CAP115 0
4
CAP114 R 0
3
CAP113 0
2
CAP112 0
1
CAP111 0
0
CAP110 0
Capture 1 data (bits 15 through 8)
7
TCCAP1HL bit Symbol (FFFFF41EH) Read/Write After reset Function CAP127
6
CAP126
5
CAP125
4
CAP124 R
3
CAP123
2
CAP122
1
CAP121
0
CAP120
Capture 1 data (bits 23 through 16)
7
TCCAP1HH bit Symbol (FFFFF41FH) Read/Write After reset Function CAP137 0
6
CAP136 0
5
CAP135 0
4
CAP134 R 0
3
CAP133 0
2
CAP132 0
1
CAP131 0
0
CAP130 0
Capture 1 data (bits 31 through 24)
(Note)
Data is not captured during a read of the capture register. Fig. 12.3.5 TMRC-related Registers TMP19A64(rev1.1) 12-12
TMP19A64C1D
TMRC Capture 2 Control Register 7
CAP2CR bit Symbol (FFFFF420H) Read/Write After reset TC2NF R/W 0
TC2IN Input noise
6
5
4
R
3
2
1
CP2EG1 R/W
0
CP2EG0 0
0
0
0
0
0
0
TC2IN input 00: Not capture 01: Rising edge 10: Falling edge 11: Both edges
Select effective edge of
Function
removal 0: Disable 1: Enable
: Selects the effective edge of an input to the trigger input pin TC2IN of the capture 2 register (TCCAP2). If this is set to "00," the capture operation is disabled. : Controls the noise removal for the TC2IN pin input. If this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54MHz) is accepted as a trigger input for TCCAP2, at whichever level the TC2IN pin is, "H" or "L." If this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54MHz) is regarded as noise and removed, at whichever level the TC2IN pin is, "H" or "L." The range of removal changes depending on the selected clock gear and a system clock used.
(Note)
Values read from bits 2 through 6 of CAP2CR are all "0."
TMRC Capture 2 Register (TCCAP2) 7
TCCAP2LL bit Symbol (FFFFF424H) Read/Write After reset Function CAP207 0
6
CAP206 0
5
CAP205 0
4
CAP204 R 0
3
CAP203 0
2
CAP202 0
1
CAP201 0
0
CAP200 0
Capture 2 data (bits 7 through 0)
7
TCCAP2LH bit Symbol (FFFFF425H) Read/Write After reset Function CAP217 0
6
CAP216 0
5
CAP215 0
4
CAP214 R 0
3
CAP213 0
2
CAP212 0
1
CAP211 0
0
CAP210 0
Capture 2 data (bits 15 through 8)
7
TCCAP2HL bit Symbol (FFFFF426H) Read/Write After reset Function CAP227 0
6
CAP226 0
5
CAP225 0
4
CAP224 R 0
3
CAP223 0
2
CAP222 0
1
CAP221 0
0
CAP220 0
Capture 2 data (bits 23 through 16)
7
TCCAP2HH bit Symbol (FFFFF427H) Read/Write After reset Function CAP237 0
6
CAP236 0
5
CAP235 0
4
CAP234 R 0
3
CAP233 0
2
CAP232 0
1
CAP231 0
0
CAP230 0
Capture 2 data (bits 31 through 24)
(Note)
Data is not captured during a read of the capture register. Fig. 12.3.6 TMRC-related Registers
TMP19A64(rev1.1) 12-13
TMP19A64C1D
TMRC Capture 3 Control Register 7
CAP3CR bit Symbol (FFFFF428H) Read/Write After reset TC3NF R/W 0
TC3IN Input noise
6
5
4
R
3
2
1
CP3EG1 R/W
0
CP3EG0 0
0
0
0
0
0
0
TC3IN input 00: Not capture 01: Rising edge 10: Falling edge 11: Both edges
Select effective edge of
Function
removal 0: Disable 1: Enable
: Selects the effective edge of an input to the trigger input pin TC3IN of the capture 3 register (TCCAP3). If this is set to "00," the capture operation is disabled. : Controls the noise removal for the TC3IN pin input. If this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54MHz) is accepted as a trigger input for TCCAP3, at whichever level the TC3IN pin is, "H" or "L." If this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54MHz) is regarded as noise and removed, at whichever level the TC3IN pin is, "H" or "L." The range of removal changes depending on the selected clock gear and a system clock used.
(Note)
Values read from bits 2 through 6 of CAP3CR are all "0."
TMRC Capture 3 Register (TCCAP3) 7 6
CAP306 0
5
CAP305 0
4
CAP304 R 0
3
CAP303 0
2
CAP302 0
1
CAP301 0
0
CAP300 0
TCCAP3LL bit Symbol (FFFFF42CH) Read/Write After reset Function
CAP307 0
Capture 3 data (bits 7 through 0)
7
TCCAP3LH bit Symbol (FFFFF42DH) Read/Write After reset Function CAP317 0
6
CAP316 0
5
CAP315 0
4
CAP314 R 0
3
CAP313 0
2
CAP312 0
1
CAP311 0
0
CAP310 0
Capture 3 data (bits 15 through 8)
7
TCCAP3HL bit Symbol (FFFFF42EH) Read/Write After reset Function CAP327 0
6
CAP326 0
5
CAP325 0
4
CAP324 R 0
3
CAP323 0
2
CAP322 0
1
CAP321 0
0
CAP320 0
Capture 3 data (bits 23 through 16)
7
TCCAP3HH bit Symbol (FFFFF42FH) Read/Write After reset Function CAP337 0
6
CAP336 0
5
CAP335 0
4
CAP334 R 0
3
CAP333 0
2
CAP332 0
1
CAP331 0
0
CAP330 0
Capture 3 data (bits 31 through 24)
(Note)
Data is not captured during a read of the capture register. Fig. 12.3.7 TMRC-related Registers
TMP19A64(rev1.1) 12-14
TMP19A64C1D
TMRCG Interrupt Mask Register 7
TCGIM bit Symbol (FFFFF40CH) Read/Write After reset Function 0
6
R 0
5
4
TBTIM
3
TCIM3 0 Mask 1: INTCAP3
2
TCIM2 R/W 0 Mask 1: INTCAP2
1
TCIM1 0 Mask 1: INTCAP1
0
TCIM0 0 Mask 1: INTCAP0
0
0 Mask 1: INTTBT
(Note)
Values read from bits 5, 6 and 7 of TCGIM are all "0."
TMRCG Status Register 7
TCGST bit Symbol (FFFFF40DH) Read/Write After reset Function 0 0 0
6
5
4
INTTBT R 0
3
INTCAP3 0
2
INTCAP2 0
1
INTCAP1 0
0
INTCAP0 0
0: Interrupt 0: Interrupt 0: Interrupt 0: Interrupt 0: Interrupt not not not not not generated generated generated generated generated 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt generated generated generated generated generated
(Note 1) A read of TCGST clears bits 0, 1, 2, 3 and 4. (Note 2) Values read from bits 5, 6 and 7 of TCGST are all "0." Fig. 12.3.8 TMRC-related Registers
TMP19A64(rev1.1) 12-15
TMP19A64C1D
TMRC Compare Control Register (CMPCTLn) 7
CMPCTL0 bit Symbol (FFFFF470H) Read/Write After reset R 0 0
TCFF0 reversal
6
TCFFEN0
5
TCFFC01 R/W 1
TCFF0 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC00
3
R
2
1
CMPRDE0
0
CMPEN0 0
Compare 0 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 0 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL1 bit Symbol (FFFFF471H) Read/Write After reset R 0
6
TCFFEN1 0
TCFF1 reversal
5
TCFFC11 R/W 1
TCFF1 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC10
3
R
2
1
CMPRDE1
0
CMPEN1 0
Compare 1 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 1 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL2 bit Symbol (FFFFF472H) Read/Write After reset R 0
6
TCFFEN2 0
TCFF2 reversal
5
TCFFC21 R/W 1
TCFF2 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC20
3
R
2
1
CMPRDE2
0
CMPEN2 0
Compare 2 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 2 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL3 bit Symbol (FFFFF473H) Read/Write After reset R 0
6
TCFFEN3 0
TCFF3 reversal
5
TCFFC31 R/W 1
TCFF3 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC30
3
R
2
1
CMPRDE3
0
CMPEN3 0
Compare 3 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 3 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
:
Controls enable/disable of the compare match detection.
: Controls enable/disable of double buffers of the compare register. : Controls F/F of the compare match output. : (Note) Controls enable/disable of F/F reversal of the compare match output.
Values read from bits 7, 3 and 2 of CMPCTLn are all "0." Fig. 12.3.9 TMRC-related Registers
TMP19A64(rev1.1) 12-16
TMP19A64C1D
TMRC Compare Control Register (CMPCTLn) 7
CMPCTL4 bit Symbol (FFFFF474H) Read/Write After reset R 0 0
TCFF4 reversal
6
TCFFEN4
5
TCFFC41 R/W 1
TCFF4 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC40
3
R
2
1
CMPRDE4
0
CMPEN4 0
Compare 4 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 4 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL5 bit Symbol (FFFFF475H) Read/Write After reset R 0
6
TCFFEN5 0
TCFF5 reversal
5
TCFFC51 R/W 1
TCFF5 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC50
3
R
2
1
CMPRDE5
0
CMPEN5 0
Compare 5 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 5 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL6 bit Symbol (FFFFF476H) Read/Write After reset R 0
6
TCFFEN6 0
TCFF6 reversal
5
TCFFC61 R/W 1
TCFF6 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC60
3
R
2
1
CMPRDE6
0
CMPEN6 0
Compare 6 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 6 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL7 bit Symbol (FFFFF477H) Read/Write After reset R 0
6
TCFFEN7 0
TCFF7 reversal
5
TCFFC71 R/W 1
TCFF7 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC70
3
R
2
1
CMPRDE7
0
CMPEN7 0
Compare 7 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 7 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
:
Controls enable/disable of the compare match detection.
: Controls enable/disable of double buffers of the compare register. : Controls F/F of the compare match output. : (Note) Controls enable/disable of F/F reversal of the compare match output.
Values read from bits 7, 3 and 2 of CMPCTLn are all "0." Fig. 12.3.10 TMRC-related Register
TMP19A64(rev1.1) 12-17
TMP19A64C1D
TMRC Compare Control Register (CMPCTLn) 7
CMPCTL8 bit Symbol (FFFFF478H) Read/Write After reset R 0 0
TCFF8 reversal
6
TCFFEN8
5
TCFFC81 R/W 1
TCFF8 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC80
3
R
2
1
CMPRDE8
0
CMPEN8 0
Compare 8 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 8 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
7
CMPCTL9 bit Symbol (FFFFF479H) Read/Write After reset R 0
6
TCFFEN9 0
TCFF9 reversal
5
TCFFC91 R/W 1
TCFF9 control 00: Reversal 01: Set 10: Clear 11: Don't care
4
TCFFC90
3
R
2
1
CMPRDE9
0
CMPEN9 0
Compare 9 enable 0: Disable 1: Enable
R/W 0 0
Double buffers 9 0: Disable 1: Enable
1
0
Function
0: Disable 1: Enable
:
Controls enable/disable of the compare match detection.
: Controls enable/disable of double buffers of the compare register. : Controls F/F of the compare match output. : (Note) Controls enable/disable of F/F reversal of the compare match output.
Values read from bits 7, 3 and 2 of CMPCTLn are all "0." Fig. 12.3.11 TMRC-related Registers
TMP19A64(rev1.1) 12-18
TMP19A64C1D
TMRC Compare Register 0 (TCCMP0) 7
TCCMP0LL bit Symbol (FFFFF440H) Read/Write After reset Function CMP007 0
6
CMP006 0
5
CMP005 0
4
CMP004 0 R/W
3
CMP003 0
2
CMP002 0
1
CMP001 0
0
CMP000 0
Compare register 0 data (bits 7 through 0)
7
TCCMP0LH bit Symbol (FFFFF441H) Read/Write After reset Function CMP017 0
6
CMP016 0
5
CMP015 0
4
CMP014 0 R/W
3
CMP013 0
2
CMP012 0
1
CMP011 0
0
CMP010 0
Compare register 0 data (bits 15 through 8)
7
TCCMP0HL bit Symbol (FFFFF442H) Read/Write After reset Function CMP027 0
6
CMP026 0
5
CMP025 0
4
CMP024 0 R/W
3
CMP023 0
2
CMP022 0
1
CMP021 0
0
CMP020 0
Compare register 0 data (bits 23 through 16)
7
TCCMP0HH bit Symbol (FFFFF443H) Read/Write After reset Function CMP037 0
6
CMP036 0
5
CMP035 0
4
CMP034 0 R/W
3
CMP033 0
2
CMP032 0
1
CMP031 0
0
CMP030 0
Compare register 0 data (bits 31 through 24)
TMRC Compare Register 1 (TCCMP1) 7
TCCMP1LL bit Symbol (FFFFF444H) Read/Write After reset Function CMP107 0
6
CMP106 0
5
CMP105 0
4
CMP104 0 R/W
3
CMP103 0
2
CMP102 0
1
CMP101 0
0
CMP100 0
Compare register 1 data (bits 7 through 0)
7
TCCMP1LH bit Symbol (FFFFF445H) Read/Write After reset Function CMP117 0
6
CMP116 0
5
CMP115 0
4
CMP114 0 R/W
3
CMP113 0
2
CMP112 0
1
CMP111 0
0
CMP110 0
Compare register 1 data (bits 15 through 8)
7
TCCMP1HL bit Symbol (FFFFF446H) Read/Write After reset Function CMP127 0
6
CMP126 0
5
CMP125 0
4
CMP124 0 R/W
3
CMP123 0
2
CMP122 0
1
CMP121 0
0
CMP120 0
Compare register 1 data (bits 23 through 16)
7
TCCMP1HH bit Symbol (FFFFF447H) Read/Write After reset Function CMP137 0
6
CMP136 0
5
CMP135 0
4
CMP134 0 R/W
3
CMP133 0
2
CMP132 0
1
CMP131 0
0
CMP130 0
Compare register 1 data (bits 31 through 24)
Fig. 12.3.12 TMRC-related Registers
TMP19A64(rev1.1) 12-19
TMP19A64C1D
TMRC Compare Register 2 (TCCMP2) 7
TCCMP2LL bit Symbol (FFFFF448H) Read/Write After reset Function CMP207 0
6
CMP206 0
5
CMP205 0
4
CMP204 0 R/W
3
CMP203 0
2
CMP202 0
1
CMP201 0
0
CMP200 0
Compare register 2 data (bits 7 through 0)
7
TCCMP2LH bit Symbol (FFFFF449H) Read/Write After reset Function CMP217 0
6
CMP216 0
5
CMP215 0
4
CMP214 0 R/W
3
CMP213 0
2
CMP212 0
1
CMP211 0
0
CMP210 0
Compare register 2 data (bits 15 through 8)
7
TCCMP2HL bit Symbol (FFFFF44AH) Read/Write After reset Function CMP227 0
6
CMP226 0
5
CMP225 0
4
CMP224 0 R/W
3
CMP223 0
2
CMP222 0
1
CMP221 0
0
CMP220 0
Compare register 2 data (bits 23 through 16)
7
TCCMP2HH bit Symbol (FFFFF44BH) Read/Write After reset Function CMP237 0
6
CMP236 0
5
CMP235 0
4
CMP234 0 R/W
3
CMP233 0
2
CMP232 0
1
CMP231 0
0
CMP230 0
Compare register 2 data (bits 31 through 24)
TMRC Compare Register 3 (TCCMP3) 7
TCCMP3LL bit Symbol (FFFFF44CH) Read/Write After reset Function CMP307 0
6
CMP306 0
5
CMP305 0
4
CMP304 0 R/W
3
CMP303 0
2
CMP302 0
1
CMP301 0
0
CMP300 0
Compare register 3 data (bits 7 through 0)
7
TCCMP3LH bit Symbol (FFFFF44DH) Read/Write After reset Function CMP317 0
6
CMP316 0
5
CMP315 0
4
CMP314 0 R/W
3
CMP313 0
2
CMP312 0
1
CMP311 0
0
CMP310 0
Compare register 3 data (bits 15 through 8)
7
TCCMP3HL bit Symbol (FFFFF44EH) Read/Write After reset Function CMP327 0
6
CMP326 0
5
CMP325 0
4
CMP324 0 R/W
3
CMP323 0
2
CMP322 0
1
CMP321 0
0
CMP320 0
Compare register 3 data (bits 23 through 16)
7
TCCMP3HH bit Symbol (FFFFF44FH) Read/Write After reset Function CMP337 0
6
CMP336 0
5
CMP335 0
4
CMP334 0 R/W
3
CMP333 0
2
CMP332 0
1
CMP331 0
0
CMP330 0
Compare register 3 data (bits 31 through 24)
Fig. 12.3.13 TMRC-related Registers
TMP19A64(rev1.1) 12-20
TMP19A64C1D
TMRC Compare Register 4 (TCCMP4) 7
TCCMP4LL bit Symbol (FFFFF450H) Read/Write After reset Function CMP407 0
6
CMP406 0
5
CMP405 0
4
CMP404 0 R/W
3
CMP403 0
2
CMP402 0
1
CMP401 0
0
CMP400 0
Compare register 4 data (bits 7 through 0)
7
TCCMP4LH bit Symbol (FFFFF451H) Read/Write After reset Function CMP417 0
6
CMP416 0
5
CMP415 0
4
CMP414 0 R/W
3
CMP413 0
2
CMP412 0
1
CMP411 0
0
CMP410 0
Compare register 4 data (bits 15 through 8)
7
TCCMP4HL bit Symbol (FFFFF452H) Read/Write After reset Function CMP427 0
6
CMP426 0
5
CMP425 0
4
CMP424 0 R/W
3
CMP423 0
2
CMP422 0
1
CMP421 0
0
CMP420 0
Compare register 4 data (bits 23 through 16)
7
TCCMP4HH bit Symbol (FFFFF453H) Read/Write After reset Function CMP437 0
6
CMP436 0
5
CMP435 0
4
CMP434 0 R/W
3
CMP433 0
2
CMP432 0
1
CMP431 0
0
CMP430 0
Compare register 4 data (bits 31 through 24)
TMRC Compare Register 5 (TCCMP5) 7
TCCMP5LL bit Symbol (FFFFF454H) Read/Write After reset Function CMP507 0
6
CMP506 0
5
CMP505 0
4
CMP504 0 R/W
3
CMP503 0
2
CMP502 0
1
CMP501 0
0
CMP500 0
Compare register 5 data (bits 7 through 0)
7
TCCMP5LH bit Symbol (FFFFF455H) Read/Write After reset Function CMP517 0
6
CMP516 0
5
CMP515 0
4
CMP514 0 R/W
3
CMP513 0
2
CMP512 0
1
CMP511 0
0
CMP510 0
Compare register 5 data (bits 15 through 8)
7
TCCMP5HL bit Symbol (FFFFF456H) Read/Write After reset Function CMP527 0
6
CMP526 0
5
CMP525 0
4
CMP524 0 R/W
3
CMP523 0
2
CMP522 0
1
CMP521 0
0
CMP520 0
Compare register 5 data (bits 23 through 16)
7
TCCMP5HH bit Symbol (FFFFF457H) Read/Write After reset Function CMP537 0
6
CMP536 0
5
CMP535 0
4
CMP534 0 R/W
3
CMP533 0
2
CMP532 0
1
CMP531 0
0
CMP530 0
Compare register 5 data (bits 31 through 24)
Fig. 12.3.14 TMRC-related Registers
TMP19A64(rev1.1) 12-21
TMP19A64C1D
TMRC Compare Register 6 (TCCMP6) 7
TCCMP6LL bit Symbol (FFFFF458H) Read/Write After reset Function CMP607 0
6
CMP606 0
5
CMP605 0
4
CMP604 0 R/W
3
CMP603 0
2
CMP602 0
1
CMP601 0
0
CMP600 0
Compare register 6 data (bits 7 through 0)
7
TCCMP6LH bit Symbol (FFFFF459H) Read/Write After reset Function CMP617 0
6
CMP616 0
5
CMP615 0
4
CMP614 0 R/W
3
CMP613 0
2
CMP612 0
1
CMP611 0
0
CMP610 0
Compare register 6 data (bits 15 through 8)
7
TCCMP6HL bit Symbol (FFFFF45AH) Read/Write After reset Function CMP627 0
6
CMP626 0
5
CMP625 0
4
CMP624 0 R/W
3
CMP623 0
2
CMP622 0
1
CMP621 0
0
CMP620 0
Compare register 6 data (bits 23 through 16)
7
TCCMP6HH bit Symbol (FFFFF45BH) Read/Write After reset Function CMP637 0
6
CMP636 0
5
CMP635 0
4
CMP634 0 R/W
3
CMP633 0
2
CMP632 0
1
CMP631 0
0
CMP630 0
Compare register 6 data (bits 31 through 24)
TMRC Compare Reg7 (TCCMP7) 7
TCCMP7LL bit Symbol (FFFFF45CH) Read/Write After reset Function CMP707 0
6
CMP706 0
5
CMP705 0
4
CMP704 0 R/W
3
CMP703 0
2
CMP702 0
1
CMP701 0
0
CMP700 0
Compare register 7 data (bits 7 through 0)
7
TCCMP7LH bit Symbol (FFFFF45DH) Read/Write After reset Function CMP717 0
6
CMP716 0
5
CMP715 0
4
CMP714 0 R/W
3
CMP713 0
2
CMP712 0
1
CMP711 0
0
CMP710 0
Compare register 7 data (bits 15 through 8)
7
TCCMP7HL bit Symbol (FFFFF45EH) Read/Write After reset Function CMP727 0
6
CMP726 0
5
CMP725 0
4
CMP724 0 R/W
3
CMP723 0
2
CMP722 0
1
CMP721 0
0
CMP720 0
Compare register 7 data (bits 23 through 16)
7
TCCMP7HH bit Symbol (FFFFF45FH) Read/Write After reset Function CMP737 0
6
CMP736 0
5
CMP735 0
4
CMP734 0 R/W
3
CMP733 0
2
CMP732 0
1
CMP731 0
0
CMP730 0
Compare register 7 data (bits 31 through 24)
Fig. 12.3.15 TMRC-related Registers
TMP19A64(rev1.1) 12-22
TMP19A64C1D
TMRC Compare Register 8 (TCCMP8) 7
TCCMP8LL bit Symbol (FFFFF460H) Read/Write After reset Function CMP807 0
6
CMP806 0
5
CMP805 0
4
CMP804 0 R/W
3
CMP803 0
2
CMP802 0
1
CMP801 0
0
CMP800 0
Compare register 8 data (bits 7 through 0)
7
TCCMP8LH bit Symbol (FFFFF461H) Read/Write After reset Function CMP817 0
6
CMP816 0
5
CMP815 0
4
CMP814 0 R/W
3
CMP813 0
2
CMP812 0
1
CMP811 0
0
CMP810 0
Compare register 8 data (bits 15 through 8)
7
TCCMP8HL bit Symbol (FFFFF462H) Read/Write After reset Function CMP827 0
6
CMP826 0
5
CMP825 0
4
CMP824 0 R/W
3
CMP823 0
2
CMP822 0
1
CMP821 0
0
CMP820 0
Compare register 8 data (bits 23 through 16)
7
TCCMP8HH bit Symbol (FFFFF463H) Read/Write After reset Function CMP837 0
6
CMP836 0
5
CMP835 0
4
CMP834 0 R/W
3
CMP833 0
2
CMP832 0
1
CMP831 0
0
CMP830 0
Compare register 8 data (bits 31 through 24)
TMRC Compare Register 9 (TCCMP9) 7
TCCMP9LL bit Symbol (FFFFF464H) Read/Write After reset Function CMP907 0
6
CMP906 0
5
CMP905 0
4
CMP904 0 R/W
3
CMP903 0
2
CMP902 0
1
CMP901 0
0
CMP900 0
Compare register 9 data (bits 7 through 0)
7
TCCMP9LH bit Symbol (FFFFF465H) Read/Write After reset Function CMP917 0
6
CMP916 0
5
CMP915 0
4
CMP914 0 R/W
3
CMP913 0
2
CMP912 0
1
CMP911 0
0
CMP910 0
Compare register 9 data (bits 15 through 8)
7
TCCMP9HL bit Symbol (FFFFF466H) Read/Write After reset Function CMP927 0
6
CMP926 0
5
CMP925 0
4
CMP924 0 R/W
3
CMP923 0
2
CMP922 0
1
CMP921 0
0
CMP920 0
Compare register 9 data (bits 23 through 16)
7
TCCMP9HH bit Symbol (FFFFF467H) Read/Write After reset Function CMP937 0
6
CMP936 0
5
CMP935 0
4
CMP934 0 R/W
3
CMP933 0
2
CMP932 0
1
CMP931 0
0
CMP930 0
Compare register 9 data (bits 31 through 24)
Fig. 12.3.16 TMRC-related Registers
TMP19A64(rev1.1) 12-23
TMP19A64C1D
13. Serial Channel (SIO)
13.1 Features
This device has seven serial I/O channels: SIO0 to SIO6. Each channel operates in either the UART mode (asynchronous communication) or the I/O interface mode (synchronous communication) which is selected by the user. I/O interface mode Mode 0: This is the mode to send and receive I/O data and associated synchronization signals (SCLK) to extend I/O. Mode 1: TX/RX Data Length: 7 bits Mode 2: TX/RX Data Length: 8 bits Mode 3: TX/RX Data Length: 9 bits In the above modes 1 and 2, parity bits can be added. The mode 3 has a wakeup function in which the master controller can start up slave controllers via the serial link (multi-controller system). Figure shows the block diagram of SIO0. Each channel consists of a prescaler, a serial clock generation circuit, a receive buffer and its control circuit, and a send buffer and its control circuit. Each channel functions independently. As the SIOs 0 to 6 operate in the same way, Only SIO0 is described here.
Mode 0 (I/O interface mode)/LSB first bit 0 1 2 3 4 5 6 7
Asynchronous (UART) mode:
Transmission direction Mode 0 (I/O interface mode)/MSB first bit 7
6
5
4
3
2
1
0
Transmission direction Mode 1 (7-bit UART mode) Without parity start bit 0 1 2 3 4 5 6 stop
With parity
start
bit 0
1
2
3
4
5
6
parity stop
Mode 2 (8-bit UART mode) Without parity start bit 0 1 2 3 4 5 6 7 stop
With parity
start
bit 0
1
2
3
4
5
6
7
parity stop
Mode 3 (9-bit UART mode) start bit 0 1 2 3 4 5 6 7 8 stop
start
bit 0
1
2
3
4
5
6
7
bit 8 Stop (wake-up)
If bit 8 =1, represents address (select code). If bit 8 =0, represents data.
Fig. 13.1 Data Format TMP19A64(rev1.1)-13-1
TMP19A64C1D
13.2 Block Diagram (Channel 0)
Prescaler 8 16 32 64 128
T0
2
4
T1 T4 T16 T64 Serial clock generation circuit BR0CR BR0CR T1 T4 T16 T64 Selector Divider BR0ADD
TB4OUT (from TMRB4)
Selector
Selector
UART Mode
SIOCLK
fSYS/2
BR0CR Baud rate generator /2
SC0MOD0 Selector
SC0MOD0
SCLK0 input (shares PC2)
I/O interface mode
SCLK0 output (shares PC2)
I/O interface mode
SC0CR
Interrupt request (INTRX0) Transmit counter (16 only with UART)
Receive counter (16 only with UART) RXDCLK SC0MOD0 Receive control
SC0MOD0
Serial channel interrupt control
Interrupt request (INTTX0)
TXDCLK
Transmit control
SC0CR Parity control RXD0 (shares PC1)
Receive buffer 1 (shift register)
CTS0 (shares PC2) SC0MOD0
Send buffer 1 (shift register)
Error flag TB8
TXD0 (shares PC0)
RB8 Receive buffer 2 (SC0BUF)
Send buffer 2 (SC0BUF)
SC0CR
FIFO control
Internal data bus
Internal data bus
Internal data bus
FIFO control
Fig. 13.2.1 SIO0 Block Diagram
TMP19A64(rev1.1)-13-2
TMP19A64C1D
13.3 Operation of Each Circuit (Channel 0)
13.3.1 Prescaler
The device includes a 7-bit prescaler to generate necessary clocks to drive SIO0. The input clock T0 to the prescaler is selected by SYSCR of CG to provide the frequency of either fperiph/2, fperiph/4, fperiph/8, or fperiph/16. The clock frequency fperiph is either the clock "fgear," to be selected by SYSCR1 of CG, or the clock "fc" before it is divided by the clock gear. The prescaler becomes active only when the baud rate generator is selected for generating the serial transfer clock. Table 13.3.1 lists the prescaler output clock resolution. Table 13.3.1 Clock Resolution to the Baud Rate Generator
@fc = 54MHz
Clear peripheral clock Clock gear value Prescaler clock selection
Prescaler output clock resolution T1 fc/25(0.6s) fc/24(0.3s) fc/23(0.15s) fc/22(0.07s) fc/26(1.2s) fc/25(0.6s) fc/24(0.3s) fc/23(0.15s) fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) fc/24(0.3s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) fc/25(0.6s) fc/24(0.3s) fc/23(0.15s) fc/22(0.07s) fc/25(0.6s) fc/24(0.3s) fc/23(0.15s) fc/25(0.6s) fc/24(0.3s) fc/25(0.6s) T4 fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) fc/24(0.3s) Fc/28(4.7s) Fc/27(2.4s) Fc/26(1.2s) fc/25(0.6s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) fc/24(0.3s) fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) fc/24(0.3s) fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) fc/24(0.3s) fc/27(2.4s) fc/26(1.2s) fc/25(0.6s) T16 fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7 s) fc/212(75.9s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) fc/29(9.5s) fc/28(4.7s) fc/27(2.4s) fc/26(1.2s) T64 fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s) fc/212(75.9s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/213(152s) fc/212(75.9s) fc/211(37.9s) fc/210(19.0s) fc/214(303s) fc/213(152s) fc/212(75.9s) fc/211(37.9s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s) fc/211(37.9s) fc/210(19.0s) fc/29(9.5s) fc/28(4.7s)
000(fc)
100(fc/2) 0 (fgear) 110(fc/4)
111(fc/8)
000(fc)
100(fc/2) 1 (fc) 110(fc/4)
111(fc/8)
00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2) 00(fperiph/16) 01(fperiph/8) 10(fperiph/4) 11(fperiph/2)
(Note 1) The prescaler output clock Tn must be selected so that the relationship "Tn < fsys/2" is satisfied (so that Tn is slower than fsys/2). (Note 2) Do not change the clock gear while SIO is operating. (Note 3) The horizontal lines in the above table indicate that the setting is prohibited. The serial interface baud rate generator uses four different clocks, i.e., T1, T4, T16 and T64, supplied from the prescaler output clock.
TMP19A64(rev1.1)-13-3
TMP19A64C1D
13.3.2
Baud Rate Generator
The baud rate generator generates transmit and receive clocks to determine the serial channel transfer rate. The baud rate generator uses either the T1, T4, T16 or T64 clock supplied from the 7-bit prescaler. This input clock selection is made by setting the baud rate setting register, BR0CR . The baud rate generator contains built-in dividers for divide by 1, (N + m/16), and 16 where N is a number from 2 to 15 and m is a number from 0 to 15. The division is performed according to the settings of the baud rate control registers BR0CR and BR0ADD to determine the resulting transfer rate. * UART Mode: 1) If BR0CR = 0, The setting of BR0ADD is ignored and the counter is divided by N where N is the value set to BR0CR . (N = 1 to 16). 2) If BR0CR = 1, The N + (16 - K)/16 division function is enabled and the division is made by using the values N (set in BR0CR ) and K (set in BR0ADD). (N = 2 to 15, K = 1 to 15) Note For the N values of 1 and 16, the above N+(16-K)/16 division function is inhibited. So, be sure to set BR0CR to "0."
*
I/O interface mode: The N + (16 - K)/16 division function cannot be used in the I/O interface mode. Be sure to divide by N, by setting BR0CR to "0."
*
Baud rate calculation to use the baud rate generator: 1) UART mode Baud rate =
Baud rated generator input clock Frequency divided by the divide ratio
/16
The highest baud rate out of the baud rate generator is 843.75 kbps when T1 is 13.5 MHz. The fsys/2 frequency, obtained by dividing the system clock by 2, can be used as the serial clock. In this case, the highest baud rate will be 1.68 Mbps when fsys is 54 MHz.
TMP19A64(rev1.1)-13-4
TMP19A64C1D
2)
I/O interface mode Baud rate =
Baud rated generator input clock Frequency divided by the divide ratio
/2
The highest baud rate will be generated when T1 is 13.5 MHz. If double buffering is used, the divide ratio can be set to "1" and the resulting output baud rate will be 6.75 Mbps. (If double buffering is not used, the highest baud rate will be 3.375 Mbps applying the divide ratio of "2.") * Example baud rate setting: 1) Division by an integer (divide by N): Selecting fc = 54 MHz for fperiph, setting T0 to fperiph/16, using the baud rate generator input clock T1, setting the divide ratio N (BR0CR) = 4, and setting BR0CR = "0," the resulting baud rate in the UART mode is calculated as follows: * Clocking conditions System clock : High-speed (fc) x 1 (fc) fperiph/16 (fperiph = fsys)
High speed clock gear : Prescaler clock : Baud rate =
fc/32 4
/16
= 54 x 106 / 32 / 4 / 16 = 26367 (bps)
(Note)
The divide by (N + (16-K)/16) function is inhibited and thus BR0ADD is ignored.
2)
For divide by N + (16-K)/16 (only for UART mode): Selecting fc = 54 MHz MHz for fperiph, setting T0 to fperiph/16, using the baud rate generator input clock T2, setting the divide ratio N (BR0CR) = 4, setting K (BR0ADD) = 14, and selecting BR0CR = 1, the resulting baud rate is calculated as follows: * Clocking conditions System clock : High-speed (fc) x 1 (fc) fperiph/16 (fperiph = fsys) High-speed clock gear : Prescaler clock : Baud rate =
4+ fc/32 /16 (16 - 14) 16
= 54 x 106 / 32 / (4 +
2 16
) / 16 = 25568 (bps)
TMP19A64(rev1.1)-13-5
TMP19A64C1D
Also, an external clock input may be used as the serial clock. The resulting baud rate calculation is shown below: * Baud rate calculation for an external clock input: 1) UART mode Baud Rate = external clock input / 16 In this, the period of the external clock input must be equal to or greater than 4/fsys. If fsys = 54 MHz, the highest baud rate will be 54 / 4 / 16 = 844 (kbps). 2) I/O interface mode Baud Rate = external clock input When double buffering is used, it is necessary to satisfy the following relationship: External clock input period > 12/fsys Therefore, when fsys = 54 MHz, the baud rate must be set to a rate lower than 54 / 12 = 4.5 (Mbps). When double buffering is not used, it is necessary to satisfy the following relationship: External clock input period > 16/fsys Therefore, when fsys = 54 MHz, the baud rate must be set to a rate lower than 54 / 16 = 3.375 (Mbps). Example baud rates for the UART mode are shown in Table 13.3.2.1 and Table 13.3.2.2.
TMP19A64(rev1.1)-13-6
TMP19A64C1D
Table 13.3.2.1 Selection of UART Baud Rate (Use the baud rate generator with BR0CR = 0)
Input clock fc [MHz] Divide ratio N (Set to BR0CR ) 19.6608 24.576 29.4912 1 2 4 8 0 5 A 1 2 3 4 6 C T1 (fc/4) 307.200 153.600 76.800 38.400 19.200 76.800 38.400 460.800 230.400 153.600 115.200 76.800 38.400 T4 (fc/16) 76.800 38.400 19.200 9.600 4.800 19.200 9.600 115.200 57.600 38.400 28.800 19.200 9.600 T16 (fc/64) 19.200 9.600 4.800 2.400 1.200 4.800 2.400 28.800 14.400 9.600 7.200 4.800 2.400
Unit (kbps)
T64 (fc/256) 4.800 2.400 1.200 0.600 0.300 1.200 0.600 7.200 3.600 2.400 1.800 1.200 0.600
(Note)
This table shows the case where the system clock is set to fc, the clock gear is set to fc/1, and the prescaler clock is set to fperiph/2. Table 13.3.2.2 Selection of UART Baud Rate (The TMRB4 timer output (internal TB4OUT) is used with the timer input clock set to T0.)
Unit (kbps)
fc TB4RG0H/L 0001H 0002H 0003H 0004H 0005H 0006H 0008H 000AH 0010H 0014H
29.4912 MHz 230.4 115.2 76.8 57.6 46.08 38.4 28.8 23.04 14.4 11.52
24.576 MHz 192 96 64 48 38.4 32 24 19.2 12 9.6
24 MHz 187.5 93.75 62.5 46.88 37.5 31.25 23.44 18.75 11.72 9.38
19.6608 MHz 153.6 76.8 51.2 38.4 30.72 25.6 19.2 15.36 9.6 7.68
16 MHz 125 62.5 41.67 31.25 25 20.83 15.63 12.5 7.81 6.25
12.288 MHz 96 48 32 24 19.2 16 12 9.6 6 4.8
Baud rate calculation to use the TMRB4 timer: Transfer rate =
Clock frequency selected by SYSCR0 < PRCK1 : 0 > TB4REG x 2 x 16
(When input clock to the timer TMRB4 is T0) (Note 1) In the I/O interface mode, the TMRB4 timer output signal cannot be used internally as the transfer clock. (Note 2) This table shows the case where the system clock is set to fc, the clock gear is set to fc/1, and the prescaler clock is set to fperiph/4.
TMP19A64(rev1.1)-13-7
TMP19A64C1D
13.3.3
Serial Clock Generation Circuit
This circuit generates basic transmit and receive clocks. * I/O interface mode: In the SCLK output mode with the SC0CR serial control register set to "0," the output of the previously mentioned baud rate generator is divided by 2 to generate the basic clock. In the SCLK input mode with SC0CR set to "1," rising and falling edges are detected according to the SC0CR setting to generate the basic clock. * Asynchronous (UART) mode: According to the settings of the serial control mode register SC0MOD0 , either the clock from the baud rate register, the system clock (fSYS/2), the internal output signal of the TMRB4 timer, or the external clock (SCLKO pin) is selected to generate the basic clock, SIOCLK.
13.3.4
Receive Counter
The receive counter is a 4-bit binary counter used in the asynchronous (UART) mode and is up-counted by SIOCLK. Sixteen SIOCLK clock pulses are used in receiving a single data bit while the data symbol is sampled at the seventh, eighth, and ninth pulses. From these three samples, majority logic is applied to decide the received data.
13.3.4
*
Receive Control Unit
I/O interface mode: In the SCLK output mode with SC0CR set to "0," the RXD0 pin is sampled on the rising edge of the shift clock output to the SCLK0 pin. In the SCLK input mode with SC0CR set to "1," the serial receive data RXD0 pin is sampled on the rising or falling edge of SCLK input depending on the SC0CR setting.
*
Asynchronous (UART) mode: The receive control unit has a start bit detection circuit, which is used to initiate receive operation when a normal start bit is detected.
13.3.5
Receive Buffer
The receive buffer is of a dual structure to prevent overrun errors. The first receive buffer (a shift register) stores the received data bit-by-bit. When a complete set of bits have been stored, they are moved to the second receive buffer (SC0BUF). At the same time, the receive buffer full flag (SC0MOD2 "RBFLL") is set to "1" to indicate that valid data is stored in the second receive buffer. However, if the receive FIFO is set enabled, the receive data is moved to the receive FIFO and this flag is immediately cleared. If the receive FIFO has been disabled (SCOFCNF = 0 and SC0MOD1=01), the INTRX0 interrupt is generated at the same time. If the receive FIFO has been enabled (SCNFCNF = 1 and SC0MOD1=01/11), an interrupt will be generated according to the SC0RFC setting. The CPU will read the data from either the second receive buffer (SC0BUF) or from the receive FIFO (the address is the same as that of the receive buffer). If the receive FIFO has not been enabled, the receive buffer full flag SC0MOD2 is cleared to "0" by the read operation. The next data received can be stored in the first receive buffer even if the CPU has not read the previous data from the second receive TMP19A64(rev1.1)-13-8
TMP19A64C1D
buffer (SC0BUF) or the receive FIFO. If SCLK is set to generate clock output in the I/O interface mode, the double buffer control bit SC0MOD2 can be programmed to enable or disable the operation of the second receive buffer (SCOBUF). By disabling the second receive buffer (i.e., the double buffer function) and also disabling the receive FIFO (SCOFCNF = 0 and = 01), handshaking with the other side of communication can be enabled and the SCLK output stops each time one frame of data is transferred. In this setting, the CPU reads data from the first receive buffer. By the read operation of CPU, the SCLK output resumes. If the second receive buffer (i.e., double buffering) is enabled but the receive FIFO is not enabled, the SCLK output is stopped when the first receive data is moved from the first receive buffer to the second receive buffer and the next data is stored in the first buffer filling both buffers with valid data. When the second receive buffer is read, the data of the first receive buffer is moved to the second receive buffer and the SCLK output is resumed upon generation of the receive interrupt INTRX. Therefore, no buffer overrun error will be caused in the I/O interface SCLK output mode regardless of the setting of the double buffer control bit SC0MOD2 . If the second receive buffer (double buffering) is enabled and the receive FIFO is also enabled (SCNFCNF = 1 and = 01/11), the SCLK output will be stopped when the receive FIFO is full (according to the setting of SCOFNCF ) and both the first and second receive buffers contain valid data. Also in this case, if SCOFCNF has been set to "1," the receive control bit RXE will be automatically cleared upon suspension of the SCLK output. If it is set to "0," automatic clearing will not be performed.
(Note)
In this mode, the SC0CR flag is insignificant and the operation is undefined. Therefore, before switching from the SCLK output mode to another mode, the SC0CR register must be read to initialize this flag.
In other operating modes, the operation of the second receive buffer is always valid, thus improving the performance of continuous data transfer. If the receive FIFO is not enabled, an overrun error occurs when the data in the second receive buffer (SC0BUF) has not been read before the first receive buffer is full with the next receive data. If an overrun error occurs, data in the first receive buffer will be lost while data in the second receive buffer and the contents of SC0CR remain intact. If the receive FIFO is enabled, the FIFO must be read before the FIFO is full and the second receive buffer is written by the next data through the first buffer. Otherwise, an overrun error will be generated and the receive FIFO overrun error flag will be set. Even in this case, the data already in the receive FIFO remains intact. The parity bit to be added in the 8-bit UART mode as well as the most significant bit in the 9-bit UART mode will be stored in SC0CR . In the 9-bit UART mode, the slave controller can be operated in the wake-up mode by setting the wake-up function SC0MOD0 to "1." In this case, the interrupt INTRX0 will be generated only when SC0CR is set to "1."
TMP19A64(rev1.1)-13-9
TMP19A64C1D
13.3.6
Receive FIFO Buffer
In addition to the double buffer function already described, data may be stored using the receive FIFO buffer. By setting of the SC0FCNF register and of the SC0MOD1 register, the 4byte receive buffer can be enabled. Also, in the UART mode or I/O interface mode, data may be stored up to a predefined fill level. When the receive FIFO buffer is to be used, be sure to enable the double buffer function. If data with parity bit is to be received in the UART mode, parity check must be performed each time a data frame is received.
13.3.7
Receive FIFO Operation
I/O interface mode with SCLK output: The following example describes the case a 4-byte data stream is received in the half duplex mode: SC0RFC<7:6>=01: Clears receive FIFO and sets the condition of interrupt generation. SC0RFC<1:0>=00: Sets the interrupt to be generated at fill level 4. SC0FCNF <1:0>=10111: Automatically inhibits continued reception after reaching the fill level. The number of bytes to be used in the receive FIFO is the same as the interrupt generation fill level.
In this condition, 4-byte data reception may be initiated by setting the half duplex transmission mode and writing "1" to the RXE bit. After receiving 4 bytes, the RXE bit is automatically cleared and the receive operation is stopped (SCLK is stopped).
Receive buffer 1 1 byte Receive buffer 2 1 byte RX FIFO 1 byte 2 byte 2 byte 1 byte 3 byte 3 byte 2 byte 1 byte 4 byte 4 byte 3 byte 2 byte 1 byte 2 byte 3 byte 4 byte
RBFLL Receive interrupt RXE
Fig. 13.3.7.1 Receive FIFO Operation
TMP19A64(rev1.1)-13-10
TMP19A64C1D
I/O interface mode with SCLK input: The following example describes the case a 10-byte data stream is received: SC0RFC <7:6> = 10: Clears receive FIFO and sets the condition of interrupt generation SC0RFC <1:0> = 00: Sets the interrupt to be generated at fill level 4. SC0FCNF <1:0> = 10101: Automatically allows continued reception after reaching the fill level. The number of bytes to be used in the receive FIFO is the maximum allowable number. In this condition, 4-byte data reception can be initiated along with the input clock by setting the half duplex transmission mode and writing "1" to the RXE bit. When the 4-byte data reception is completed, the receive FIFO interrupt will be generated. Note that preparation for the next data reception can be managed in this setting, i.e., the next 4-byte data can be received before data is fully read from the FIFO. Receive buffer 1 1 byte Receive buffer 2 1 byte RX FIFO 1 byte 2 byte 2 byte 1 byte 3 byte 3 byte 2 byte 1 byte 4 byte 4 byte 3 byte 2 byte 1 byte 2 byte 3 byte 4 byte
RBFLL Receive interrupt RXE
Fig. 13.3.7.2 Receive FIFO Operation
TMP19A64(rev1.1)-13-11
TMP19A64C1D
13.3.8
Transmit Counter
The transmit counter is a 4-bit binary counter used in the asynchronous communication (UART) mode. It is counted by SIOCLK as in the case of the receive counter and generates a transmit clock (TXDCLK) on every 16th clock pulse.
SIOCLK 15 TXDCLK 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2
Fig. 13.3.8.1 Transmit Clock Generation
13.3.9
Transmit Control Unit
* I/O interface mode: In the SCLK output mode with SC0CR set to "0," each bit of data in the send buffer is output to the TXD0 pin on the rising edge of the shift clock output from the SCLK0 pin. In the SCLK input mode with SC0CR set to "1," each bit of data in the send buffer is output to the TXD0 pin on the rising or falling edge of the input SCLK signal according to the SC0CR setting. * Asynchronous (UART) mode: When the CPU writes data to the send buffer, data transmission is initiated on the rising edge of the next TXDCLK and the transmit shift clock (TXDSFT) is also generated.
TMP19A64(rev1.1)-13-12
TMP19A64C1D
*
Handshake function The CTS pin enables frame by frame data transmission so that overrun errors can be prevented. This function can be enabled or disabled by SC0MOD0 . When the CTS pin is set to the "H" level, the current data transmission can be completed but the next data transmission is suspended until the CTS pin returns to the "L" level. However in this case, the INTTX0 interrupt is generated, the next transmit data is requested to the CPU, data is written to the send buffer, and it waits until it is ready to transmit data. Although no RTS pin is provided, a handshake control function can be easily implemented by assigning a port for the RTS function. By setting the port to "H" level upon completion of data reception (in the receive interrupt routine), the transmit side can be requested to suspend data transmission.
TXD
RXD
CTS
Transmit side
RTS (Any port)
Receive side
Fig. 13.3.9.1 Handshake Function
Data write timing to send buffer or shift register
Transmission is suspended during this period
CTS
13 SIOCLK TXDCLK
14
15
16
1
2
3
14
15
16
1
2
3
TXD
start bit
bit 0
(Note)
If the CTS signal is set to "H" during transmission, the next data transmission is suspended after the current transmission is completed. Data transmission starts on the first falling edge of the TXDCLK clock after CTS is set to "L." Fig. 13.3.9.2 CTS (Clear to Send) Signal Timing
TMP19A64(rev1.1)-13-13
TMP19A64C1D
13.3.10 Transmit Buffer
The send buffer (SC0BUF) is in a dual structure. The double buffering function may be enabled or disabled by setting the double buffer control bit in serial mode control register 2 (SC0MOD2). If double buffering is enabled, data written to send buffer 2 (SCOBUF) is moved to send buffer 1 (shift register). If the transmit FIFO has been disabled (SCOFCNF = 0 or 1 and = 01), the INTTX interrupt is generated at the same time and the send buffer empty flag of SC0MOD2 is set to "1." This flag indicates that send buffer 2 is now empty and that the next transmit data can be written. When the next data is written to send buffer 2, the flag is cleared to "0." If the transmit FIFO has been enabled (SCNFCNF = 1 and = 10/11), any data in the transmit FIFO is moved to the send buffer 2 and flag is immediately cleared to "0." The CPU writes data to send buffer 2 or to the transmit FIFO. If the transmit FIFO is disabled in the I/O interface SCLK input mode and if no data is set in send buffer 2 before the next frame clock input, which occurs upon completion of data transmission from send buffer 1, an under-run error occurs and a serial control register (SC0CR) parity/under-run flag is set. If the transmit FIFO is enabled in the I/O interface SCLK input mode, when data transmission from send buffer 1 is completed, the send buffer 2 data is moved to send buffer 1 and any data in transmit FIFO is moved to send buffer 2 at the same time. If the transmit FIFO is disabled in the I/O interface SCLK output mode, when data in send buffer 2 is moved to send buffer 1 and the data transmission is completed, the SCLK output stops. So, no under-run errors can be generated. If the transmit FIFO is enabled in the I/O interface SCLK output mode, the SCLK output stops upon completion of data transmission from send buffer 1 if there is no valid data in the transmit FIFO.
Note)
In the I/O interface SCLK output mode, the SC0CR flag is insignificant. In this case, the operation is undefined. Therefore, to switch from the SCLK output mode to another mode, SC0CR must be read in advance to initialize the flag.
If double buffering is disabled, the CPU writes data only to send buffer 1 and the transmit interrupt INTTX is generated upon completion of data transmission. If handshaking with the other side is necessary, set the double buffer control bit to "0" (disable) to disable send buffer 2; any setting for the transmit FIFO should not be performed.
TMP19A64(rev1.1)-13-14
TMP19A64C1D
13.3.11 Transmit FIFO Buffer
In addition to the double buffer function already described, data may be stored using the transmit FIFO buffer. By setting of the SC0FCNF register and of the SC0MOD1 register, the 4byte send buffer can be enabled. In the UART mode or I/O interface mode, up to 4 bytes of data may be stored. If data is to be transmitted with a parity bit in the UART mode, parity check must be performed on the receive side each time a data frame is received.
13.3.12 Transmit FIFO Operation
I/O interface mode with SCLK output (normal mode): The following example describes the case a 4-byte data stream is transmitted: SC0TFC <7:6> = 01: Clears transmit FIFO and sets the condition of interrupt generation SC0TFC <1:0> = 00: Sets the interrupt to be generated at fill level 0. SC0FCNF <1:0> = 01011: Inhibits continued transmission after reaching the fill level. In this condition, data transmission can be initiated by setting the transfer mode to half duplex, writing 4 bytes of data to the transmit FIFO, and setting the bit to "1." When the last transmit data is moved to the send buffer, the transmit FIFO interrupt is generated. When transmission of the last data is completed, the clock is stopped and the transmission sequence is terminated.
Data 6 Data 5 Data 4 Data 3
TX FIFO
Data 6 Data 5 Data 4
Data 6 Data 5 Data 6 Data 6
Send buffer 2 Send buffer 1
Data 2
Data 3
Data 4
Data 5
Data 5
Data 1
Data 2
Data 3
Data 4
TBEMP INTTX0 TXE
Fig. 13.3.12.1 Transmit FIFO Operation
TMP19A64(rev1.1)-13-15
TMP19A64C1D
I/O interface mode with SCLK input (normal mode): The following example describes the case a 4-byte data stream is transmitted: SC0TFC <1:0> = 01: Clears the transmit FIFO and sets the condition of interrupt generation. SC0TFC <7:2> = 000000: Sets the interrupt to be generated at fill level 0. SC0FCNF <4:0> = 01001: Allows continued transmission after reaching the fill level. In this condition, data transmission can be initiated along with the input clock by setting the transfer mode to half duplex, writing 4 bytes of data to the transmit FIFO, and setting the bit to "1." When the last transmit data is moved to the send buffer, the transmit FIFO interrupt is generated
Data 6 Data 5 Data 4 Data 3
TX FIFO
Data 6 Data 5 Data 4 Data 6 Data 5 Data 6 Data 6
Send buffer 2 Send buffer 1
Data 2
Data 3
Data 4
Data 5
Data 5
Data 1
Data 2
Data 3
Data 4
TBEMP INTTX0 TXE
Fig. 13.3.12.2 Transmit FIFO Operation
TMP19A64(rev1.1)-13-16
TMP19A64C1D
13.3.13 Parity Control Circuit
If the parity addition bit of the serial control register SC0CR is set to "1," data is sent with the parity bit. Note that the parity bit may be used only in the 7- or 8-bit UART mode. The bit of SC0CR selects either even or odd parity. Upon data transmission, the parity control circuit automatically generates the parity with the data written to the send buffer (SC0BUF). After data transmission is complete, the parity bit will be stored in SC0BUF bit 7 in the 7-bit UART mode and in bit 7 in the serial mode control register SC0MOD in the 8-bit UART mode. The and settings must be completed before data is written to the send buffer. Upon data reception, the parity bit for the received data is automatically generated while the data is shifted to receive buffer 1 and moved to receive buffer 2 (SC0BUF). In the 7-bit UART mode, the parity generated is compared with the parity stored in SC0BUF , while in the 8-bit UART mode, it is compared with the bit 7 of the SC0CR register. If there is any difference, a parity error occurs and the flag of the SC0CR register is set. In the I/O interface mode, the SC0CR flag functions as an under-run error flag, not as a parity flag.
13.3.14 Error Flag
Three error flags are provided to increase the reliability of received data. 1. Overrun error : Bit 4 of the serial control register SC0CR In both UART and I/O interface modes, this bit is set to "1" when an error is generated by completing the reception of the next frame receive data before the receive buffer has been read. If the receive FIFO is enabled, the received data is automatically moved to the receive FIFO and no overrun error will be generated until the receive FIFO is full (or until the usable bytes are fully occupied). This flag is set to "0" when it is read. In the I/O interface SCLK output mode, no overrun error is generated and therefore, this flag is inoperative and the operation is undefined. 2. Parity error/under-run error : Bit 3 of the SC0CR register In the UART mode, this bit is set to "1" when a parity error is generated. A parity error is generated when the parity generated from the received data is different from the parity received. This flag is set to "0" when it is read. In the I/O interface mode, this bit indicates an under-run error. When the double buffer control bit of the serial mode control register SC0MOD2 is set to "1" in the SCLK input mode, if no data is set to the transmit double buffer before the next data transfer clock after completing the transmission from the transmit shift register, this error flag is set to "1" indicating an under-run error. If the transmit FIFO is enabled, any data content in the transmit FIFO will be moved to the buffer. When the transmit FIFO and the double buffer are both empty, an under-run error will be generated. Because no under-run errors can be generated in the SCLK output mode, this flag is inoperative and the operation is undefined. If send buffer 2 is disabled, the under-run flag will not be set. This flag is set to "0" when it is read.
TMP19A64(rev1.1)-13-17
TMP19A64C1D
3.
Framing error : Bit 2 of the SC0CR register In the UART mode, this bit is set to "1" when a framing error is generated. This flag is set to "0" when it is read. A framing error is generated if the corresponding stop bit is determined to be "0" by sampling the bit at around the center. Regardless of the (stop bit length) setting of the serial mode control register 2, SC0MOD2, the stop bit status is determined by only 1 bit on the receive side.
Operation mode UART Error flag OERR PERR FERR OERR PERR FERR OERR PERR FERR Function Overrun error flag Parity error flag Framing error flag Overrun error flag Underrun error flag (WBUF = 1) Fixed to 0 (WBUF = 0) Fixed to 0 Operation undefined Operation undefined Fixed to 0
I/O interface (SCLK input)
I/O interface (SCLK output)
TMP19A64(rev1.1)-13-18
TMP19A64C1D
13.3.15 Direction of Data Transfer
In the I/O interface mode, the direction of data transfer can be switched between "MSB first" and "LSB first" by the data transfer direction setting bit of the SC0MOD2 serial mode control register 2. Don't switch the direction when data is being transferred.
13.3.16 Stop Bit Length
In the UART mode transmission, the stop bit length can be set to either 1 or 2 bits by bit 4 of the SC0MOD2 register.
13.3.17 Status Flag
If the double buffer function is enabled (SC0MOD2 = "1"), the bit 6 flag of the SC0MOD2 register indicates the condition of receive buffer full. When one frame of data has been received and transferred from buffer 1 to buffer 2, this bit is set to "1" to show that buffer 2 is full (data is stored in buffer 2). When the receive buffer is read by CPU/DMAC, it is cleared to "0." If is set to "0," this bit is insignificant and must not be used as a status flag. When double buffering is enabled (SC0MOD2 = "1"), the bit 7 flag of the SC0MOD2 register indicates that send buffer 2 is empty. When data is moved from send buffer 2 to send buffer 1 (shift register), this bit is set to "1" indicating that send buffer 2 is now empty. When data is set to the send buffer by CPU/DMAC, the bit is cleared to "0." If is set to "0," this bit is insignificant and must not be used as a status flag.
13.3.18 Configurations of Send/Receive Buffers
= 0 UART I/O interface (SCLK input) I/O interface (SCLK output) Transmit buffer Receive buffer Transmit buffer Receive buffer Transmit buffer Receive buffer Single Double Single Double Single Single = 1 Double Double Double Double Double Double
TMP19A64(rev1.1)-13-19
TMP19A64C1D
13.3.19 Signal Generation Timing
UART Mode: Receive Side
Mode Interrupt generation timing Framing error timing 9-bit Around the center of the 1st stop bit Around the center of the stop bit 8-bit with parity Around the center of the 1st stop bit Around the center of the stop bit Around the center of the last (parity) bit Around the center of the stop bit 8-bit, 7-bit, and 7-bit with parity Around the center of the 1st stop bit Around the center of the stop bit Around the center of the last (parity) bit Around the center of the stop bit
Parity error generation timing Overrun error generation Around the center timing of the stop bit
Transmit Side
Mode Interrupt generation timing ( = 0) Interrupt generation timing ( = 1) 9-bit 8-bit with parity 8-bit, 7-bit, and 7-bit with parity Just before the stop Just before the stop bit is Just before the stop bit is sent bit is sent sent Immediately after data is moved to send buffer 1 (just before start bit transmission) Immediately after data is Immediately after data is moved to moved to send buffer 1 send buffer 1 (just before start bit (just before start bit transmission) transmission)
I/O interface mode: Receive Side
Interrupt generation SCLK output Immediately after the rising edge of the last SCLK timing mode (WBUF = 0) SCLK input mode Immediately after the rising or falling edge of the last SCLK (for rising or falling edge mode, respectively) Interrupt generation SCLK output Immediately after the rising edge of the last SCLK (just after data timing mode transfer to receive buffer 2) or just after receive buffer 2 is read (WBUF = 1) SCLK input mode Immediately after the rising edge or falling edge of the last SCLK depending on the rising or falling edge triggering mode, respectively (right after data is moved to receive buffer 2) Overrun error SCLK input mode Immediately after the rising or falling edge of the last SCLK (for generation timing rising or falling edge mode, respectively)
Transmit Side
Interrupt generation SCLK output Immediately after the rising edge of the last SCLK timing mode (WBUF = 0) SCLK input mode Immediately after the rising or falling edge of the last SCLK (for rising or falling edge mode, respectively) Interrupt generation SCLK output Immediately after the rising edge of the last SCLK or just after timing mode data is moved to send buffer 1 (WBUF = 1) SCLK input mode Immediately after the rising or falling edge of the last SCLK (for the rising or falling edge mode, respectively) or just after data is moved to send buffer 1 Under-run error SCLK input mode Immediately after the falling or rising edge of the next SCLK (for generation timing the rising or falling edge triggering mode, respectively)
Note 1) Do not modify any control register when data is being sent or received (in a state ready to send or receive). Note 2) Do not stop the receive operation (by setting SC0MOD0 = "0") when data is being received. Note 3) Do not stop the transmit operation (by setting SC0MOD1 = "0") when data is being transmitted.
TMP19A64(rev1.1)-13-20
TMP19A64C1D
13.4 Register Description (Only for Channel 0)
7 TB8 0 Send data Bit 8 6 CTSE 0
Handshake function control 0: Disables CTS 1: Enables CTS
bit Symbol Read/Write SC0MOD0 (0xFFFF_F262) After reset Function
5 RXE 0 Receive control
4 WU
3 SM1
2 SM0
1 SC1
0 SC0
R/W 0 0 0 Wake-up Serial transfer mode function 00: I/O interface mode 0: Disables 0: Disable 01: 7-bit length reception UART mode 1: Enable 1: Enables 10: 8-bit length reception UART mode 11: 9-bit length UART mode
0 0 Serial transfer clock (for UART) 00: Timer TB4OUT 01: Baud rate generator 10: Internal fSYS/2 clock 11: External clock (SCLK0 input)
Note) In the I/O interface mode, the serial control register (SC0CR) is used for clock selection. Wakeup function 9-bit UART 0 1 Interrupt when received Interrupt at RB8=1 Other mode don't care
Handshake function ( CTS pin) enable 0 1 Disable (transmission is always allowed) Enable
Note)
With set to "0," set each mode register (SC0MOD0, SC0MOD1 and SC0MOD2). Then set to "1."
Fig. 13.4.1 Serial Mode Control Register 0 (for SIO0, SC0MOD0)
TMP19A64(rev1.1)-13-21
TMP19A64C1D
SC0MOD1 (0xFFFF_F265)
bit Symbol Read/Write After reset Function
7 I2S0
6 FDPX1
5 FDPX0
4 TXE
3 SINT2
2 SINT1
1 SINT0
0
0 IDLE 0: Stop 1: Start
0 0 Transfer mode setting 00: Transfer prohibited 01: Half duplex (RX) 10: Half duplex (TX) 11: Full duplex
R/W 0 0 0 0 Transmit Interval time of continuous control transmission 0: Disable 000: None 100: 8SCLK 1: Enable 001: 1SCLK 101:16SCLK 010: 2SCLK 110: 32SCLK 011: 4SCLK 111: 64SCLK
0 Write "0."
Fig. 13.4.2 Serial Mode Control Register 1 (for SIO0, SC0MOD1)
:
Specifies the interval time of continuous transmission when double buffering or FIFO is enabled in the I/O interface mode. This parameter is invalid for the UART mode or when an external clock is used. This bit enables transmission and is valid for all the transfer modes. If disabled while transmission is in progress, transmission is inhibited only after the current frame of data is completed for transmission.
:
: Configures the transfer mode in the I/O interface mode. Also configures the FIFO if it is enabled. In the UART mode, it is used only to specify the FIFO configuration. : Specifies the Idle mode operation.
TMP19A64(rev1.1)-13-22
TMP19A64C1D
SC0MOD2 (0xFFFF_F266)
bit Symbol Read/Write After reset
7 TBEMP
6 RBFLL
5 TXRUN
4 SBLEN
3 DRCHG
2 WBUF
R/W 1 Send buffer empty flag 0: full 1: Empty 0 Receive buffer full flag 0: Empty 1: full 0 In transmissi on flag 0: Stop 1: Start 0 Stop bit 0: 1-bit 1: 2-bit 0 Setting transfer direction
0: LSB first 1: MSB first
0 W-buffer 0: Disable 1: Enable
1 SWRST1 W 0 Soft reset
0 SWRST0 W 0
Function
Overwrite "01" on "10" to reset
: Overwriting "01" in place of "10" generates a software reset. When this software reset is executed, the mode register parameters SC0MOD0 , SC0MOD1, SC0MOD2 , , and , control register parameters SC0CR , , and , and their internal circuits are initialized. : This parameter enables or disables the send/receive buffers to send (in both SCLK output/input modes) and receive (in SCLK output mode) data in the I/O interface mode and to transmit data in the UART. In all other modes, double buffering is enabled regardless of the setting. Specifies the direction of data transfer in the I/O interface mode. In the UART mode, it is fixed to LSB first. This is a status flag to show that data transmission is in progress. When this bit is set to "1," it indicates that data transmission operation is in progress. If it is "0," the bit 7 is set to "1" to indicate that the transmission has been fully completed and the same is set to "0" to indicate that the send buffer contains some data waiting for the next transmission. This is a flag to show that the receive double buffers are full. When a receive operation is completed and received data is moved from the receive shift register to the receive double buffers, this bit changes to "1" while reading this bit changes it to "0." If double buffering is disabled, this flag is insignificant. This flag shows that the send double buffers are empty. When data in the send double buffers is moved to the send shift register and the double buffers are empty, this bit is set to "1." Writing data again to the double buffers sets this bit to "0." If double buffering is disabled, this flag is insignificant. This specifies the length of stop bit transmission in the UART mode. On the receive side, the decision is made using only a single bit regardless of the setting. While data transmission is in progress, any software reset operation must be executed twice in succession. Fig. 13.4.3 Serial Mode Control Register
: :
:
:
:
(Note)
TMP19A64(rev1.1)-13-23
TMP19A64C1D
bit Symbol SC0CR (0xFFFF_F261) Read/Write After reset
Function
7 RB8 R 0 Receive data Bit 8
6 EVEN R/W 0 Parity 0: Odd 1: Even
5 PE 0 Add parity 0: Disable 1: Enable
4 3 2 OERR PERR FERR R (cleared to "0" when read) 0 0 0 0: Normal operation 1: Error Overrun Parity/ under-run Framing
1 SCLKS
0 IOC
R/W 0 0 0: SCLK0 0: Baud
1: SCLK0
rate generator 1: SCLK0 pin input
I/O interface input clock selection 0 Baud rate generator 1 SCLK0 pin input Edge selection for SCLK0 input operation Data send/receive at rising 0 edges of SCLK0 Data send/receive at falling 1 edges of SCLK0 Framing error flag Parity error/under-run error flag Overrun error flag Cleared to "0" when read
Add/check even parity 0 Odd parity 1 Even parity
(Note)
Any error flag is cleared when read. Fig. 13.4.4 Serial Control Register (for SIO0, SC0CR)
TMP19A64(rev1.1)-13-24
TMP19A64C1D
7 BR0CR (0xFFFF_F263) bit Symbol Read/Write After reset
6 BR0ADDE 0
5 BR0CK1 0
0 Write "0."
4 3 BR0CK0 BR0S3 R/W 0 0
2 BR0S2 0
1 BR0S1 0
0 BR0S0 0
N+(16-K)/16 00: T1 divider 01: T4 function
Function
0: Disable 1: Enable
10: T16 11: T64
Divide ratio "N"
Select input clock to the baud rate generator 00 Internal clock T1 01 10 11
7 BR0ADD (0xFFFF_F264) bit Symbol Read/Write After reset 6 R 0 0 0 0 0 0
Internal clock T4 Internal clock T16 Internal clock T64
5 4 3 BR0K3 2 BR0K2 R/W 0 0 1 BR0K1 0 BR0K0
Specify K for the "N + (16 - K)/16" division Function
~
~
Setting divide ratio of the baud rate generator BR0CR = 1 BR0CR 0000 (N = 16) 0010 (N = 2) BR0ADD 0000 0001 (K = 1) 1111 (K = 15)
~
BR0CR = 0 0001 (N = 1) (ONLY UART) 1111 (N = 15) 0000 (N = 16)
~
0001 (N = 1) Disable Disable
1111 (N = 15) Disable N+ (16 - K) Division
16
Divide by N
(Note 1) In the UART mode, the division ratio "1" of the baud rate generator can be specified only when the "N + (16 - K)/16" division function is not used. In the I/O interface mode, the division ratio "1" of the baud rate generator can be specified only when double buffering is used. (Note 2) To use the "N + (16 - K)/16" division function, be sure to set BR0CR to "1" after setting the K value (K = 1 to 15) to BR0ADD . However, don't use the "N + (16 K)/16" division function when BR0CR is set to either "0000" or "0001" (N = 16 or 1). (Note 3) The "N + (16 - K)/16" division function can only be used in the UART mode. In the I/O interface mode, the "N + (16 - K)/16" division function must be disabled (prohibited) by setting BR0CR to "0." Fig. 13.4.5 Baud Rate Generator Control (for SIO0, BR0CR, BR0ADD) TMP19A64(rev1.1)-13-25
TMP19A64C1D
SC0BUF (0xFFFF_F260)
bit Symbol Read/Write After reset Function
7 TB7/RB7 0
6 TB6/RB6 0
5 TB5/RB5
4 3 2 TB4/RB4 TB3/RB3 TB2/RB2 R/W 0 0 0 0 TB7 to TB0: Send buffer + FIFO RB7 to RB0: Receive buffer + FIFO
1 TB1/RB1 0
0 TB0/RB0 0
Note:
HSCBUF works as a send buffer for WR operation and as a receive buffer for RD operation. Fig. 13.4.6 SIO0 Send/Receive Buffer Register
7 bit Symbol Read/Write After reset
6
5
4 RFST R/W 0 Bytes used in RX FIFO
3 TFIE
2 RFIE 0 RX interrupt for RX FIFO 0: Disable 1: Enable
1 RXTXCNT 0 Automatic disable of RXE/TXE 0: None 1: Auto Disable
0 CNFG 0 FIFO Enable 0: Disable 1: Enable
SC0FCNF (0xFFFF_F26C)
0
0
0
Be sure to write "000."
Function
0 TX interrupt for TX 0: Maximum FIFO 1: Same as 0: Disable Fill level 1: Enable
of RX FIFO
: If enabled, the SCOMOD1 setting automatically configures FIFO as follows: = 01 (Half duplex RX) ---- 4-byte RX FIFO = 10 (Half duplex TX) ---- 4-byte TX FIFO = 11 (Full duplex) --------- 2-Byte RX FIFO + 2-Byte TX FIFO :0 The function to automatically disable RXE/TXE bits is disabled. 1: If enabled, the SCOMOD1 is used to set as follows: = 01 (Half duplex RX) ------ When the RX FIFO is filled up to the specified number of valid bytes, RXE is automatically set to "0" to inhibit further reception. = 10 (Half duplex TX) ------ When the TX FIFO is empty, TXE is automatically set to "0" to inhibit further transmission. = 11 (Full duplex) ----------- When either of the above two conditions is satisfied, TXE/RXE are automatically set to "0" to inhibit further transmission and reception. : When RX FIFO is enabled, receive interrupts are enabled or disabled by this parameter. : When TX FIFO is enabled, transmit interrupts are enabled or disabled by this parameter. : When RX FIFO is enabled, the number of RX FIFO bytes to be used is selected. 0: The maximum number of bytes of the FIFO configured 4 bytes when = 01 (Half duplex RX) and 2 bytes for = 11 (Full duplex) 1: Same as the fill level for receive interrupt generation specified by SC0RFC . (Note 1) Regarding TX FIFO, the maximum number of bytes being configured is always available. The available number of bytes is the bytes already written to the TX FIFO. Fig. 13.4.7 FIFO Configuration Register
TMP19A64(rev1.1)-13-26
TMP19A64C1D
SC0RFC (0xFFFF_F268)
bit Symbol Read/Write After reset
7 RFCS W 0 Clear RX FIFO 1: Clear Always reads "0."
6 RFIS R/W 0 Select interrupt generation condition
5
4 R
3
2
1 RIL1
0 RIL0
0
0
0
0
R/W 0 0 FIFO fill level to generate RX interrupts 00: 4 bytes (2 bytes if full duplex) 01: 1byte 10: 2byte 11: 3byte Note: RIL1 is ignored when FDPX1:0 = 11 (full duplex)
Function
0: An interrupt is generated when the specified fill level is reached. 1: An interrupt is generated when the specified fill level is reached or if the specified fill level has been exceeded at the time data is read. Fig. 13.4.8 Receive FIFO Control Register
Transmit FIFO Configuration Register
bit Symbol Read/Write After reset 7 TFCS w 0 Clear TX FIFO 1: Clear Always reads "0." 6 TFIS R/W 0 Select interrupt generation condition 5 4 R 0 0 0 0 3 2 1 TIL1 0 TIL0
SC0TFC (0xFFFF_F269)
R/W 0 0 FIFO fill level to generate TX interrupts 00: Empty 01: 1byte 10: 2byte 11: 3byte Note: TIL1 is ignored when FDPX1:0 = 11 (full duplex).
Function
0: An interrupt is generated when the specified fill level is reached. 1: An interrupt is generated when the specified fill level is reached or if the level is lower than the specified fill level at the time new data is written. Fig. 13.4.9 Transmit FIFO Configuration Register
TMP19A64(rev1.1)-13-27
TMP19A64C1D
SC0RST (0xFFFF_F26A)
bit Symbol Read/Write After reset
7 ROR R 0 RX FIFO Overrun
1: Generated
6
5
4
3
R 0 0 0 0
Function
1 0 RLVL1 RLVL0 R 0 0 0 Status of RX FIFO fill level 000: Empty 001: 1Byte 010: 2Byte 011: 3Byte 100: 4Byte
2 RLVL2
(Note)
The bit is cleared to "0" when receive data is read from the SC0BUF register. Fig. 13.4.10 Receive FIFO Status Register
7 bit Symbol Read/Write After reset TUR R 1 TX FIFO Under run
1: Generated
6
5 R
4
3
2 TLVL2
0
SC0TST (0xFFFF_F26B)
0
0
0
0
Function
TLVL1 TLVL0 R 0 0 0 Status of TX FIFO fill level 000: Empty 001: 1Byte 010: 2Byte 011: 3Byte 100: 4Byte
(Note)
The bit is cleared to "0" when transmit data is written to the SC0BUF register. Fig. 13.4.11 Transmit FIFO Status Register
7 bit Symbol Read/Write After reset Function
6
5
4 R 0
3
2
1
SC0EN (0xFFFF_F267)
0
0
0
0
0
0
0 SIOE R/W 0 SIO operation 0: Disable 1: Enable
: It specifies SIO operation. When SIO operation is disabled, the clock will not be supplied to the SIO module except for the register part and thus power dissipation can be reduced (other registers cannot be accessed for read/write operation). When SIO is to be used, be sure to enable SIO by setting "1" to this register before setting any other registers of the SIO module. If SIO is enabled once and then disabled, any register setting is maintained. Fig. 13.4.12 SIO Enable Register
TMP19A64(rev1.1)-13-28
TMP19A64C1D
13.5 Operation in Each Mode
13.5.1 Mode 0 (I/O Interface Mode)
Mode 0 consists of two modes, i.e., the "SCLK output" mode to output synchronous clock and the "SCLK input" mode to accept synchronous clock from an external source. The following operational descriptions are for the case use of FIFO is disabled. For details of FIFO operation, refer to the previous sections describing receive/transmit FIFO functions. Sending data SCLK output mode In the SCLK output mode, if SC0MOD2 is set to "0" and the send double buffers are disabled, 8 bits of data are output from the TXD0 pin and the synchronous clock is output from the SCLK0 pin each time the CPU writes data to the send buffer. When all data is output, the INTTX0 interrupt is generated. If SC0MOD2 is set to "1" and the send double buffers are enabled, data is moved from send buffer 2 to send buffer 1 when the CPU writes data to send buffer 2 while data transmission is halted or when data transmission from send buffer 1 (shift register) is completed. When data is moved from send buffer 2 to send buffer 1, the send buffer empty flag SC0MOD2 is set to "1," and the INTTX0 interrupt is generated. If send buffer 2 has no data to be moved to send buffer 1, the INTTX0 interrupt is not generated and the SCLK0 output stops.
Transmit data write timing SCLK0 output TXD0 (INTTX0 interrupt request)
TBRUN
bit 0
bit 1
bit 6
bit 7
bit 0
= "0" (if double buffering is disabled)
Transmit data write timing SCLK0 output TXD0 (INTTX0 interrupt request) TBRUN TBEMP bit 0 bit 1 bit 6 bit 7 bit 0
= "1" (if double buffering is enabled) (if there is data in buffer 2)
TMP19A64(rev1.1)-13-29
TMP19A64C1D
Transmit data write timing SCLK0 output TXD0
(INTTX0 interrupt request)
bit 0
bit 1
bit 6
bit 7
TBRUN TBEMP
= "1" (if double buffering is enabled) (if there is no data in buffer 2) Fig. 13.5.1.11 Send Operation in the I/O Interface Mode (SCLK0 Output Mode)
SCLK input mode In the SCLK input mode, if SC0MOD2 is set to "0" and the send double buffers are disabled, 8-bit data that has been written in the send buffer is output from the TXD0 pin when the SCLK0 input becomes active. When all 8 bits are sent, the INTTX0 interrupt is generated. The next send data must be written before the timing point "A" as shown in Fig. 13.5.1.2. If SC0MOD2 is set to "1" and the send double buffers are enabled, data is moved from send buffer 2 to send buffer 1 when the CPU writes data to send buffer 2 before the SCLK0 becomes active or when data transmission from send buffer 1 (shift register) is completed. As data is moved from send buffer 2 to send buffer 1, the send buffer empty flag SC0MOD2 is set to "1" and the INTTX0 interrupt is generated. If the SCLK0 input becomes active while no data is in send buffer 2, although the internal bit counter is started, an under-run error occurs and 8-bit dummy data (FFh) is sent.
Transmit data write timing
A
SCLK0 input (=0 rising edge mode) SCLK0 input (=1 falling edge mode) TXD0
(INTTX0 interrupt request)
bit 0
bit 1
bit 5
bit 6
bit 7
bit 0
bit 1
= "0" (if double buffering is disabled)
TMP19A64(rev1.1)-13-30
TMP19A64C1D
Transmit data write timing
SCLK0 input (=0 rising edge mode)
SCLK0 input
A
(=1 falling edge mode)
TXD0
(INTTX0 interrupt request)
bit 0
bit 1
bit 5
bit 6
bit 7
bit 0
bit 1
TBRUN TBEMP
= "1" (if double buffering is enabled) (if there is data in buffer 2)
A
Transmit data write timing
SCLK0 input (=0 rising edge mode) SCLK0 input (=1 falling edge mode)
TXD0
(INTTX0 interrupt request)
bit 0
bit 1
bit 5
bit 6
bit 7
1
1
TBRUN TBEMP
PERR (functions to detect under-run errors)
= "1" (if double buffering is enabled) (if there is no data in buffer 2) Fig. 13.5.1.2 Send Operation in the I/O Interface Mode (SCLK0 Input Mode)
TMP19A64(rev1.1)-13-31
TMP19A64C1D
Receiving data SCLK output mode In the SCLK output mode, if SC0MOD2 = "0" and receive double buffering is disabled, a synchronous clock pulse is output from the SCLK0 pin and the next data is shifted into receive buffer 1 each time the CPU reads received data. When all the 8 bits are received, the INTRX0 interrupt is generated. The first SCLK output can be started by setting the receive enable bit SC0MOD0 to "1." If the receive double buffering is enabled with SC0MOD2 set to "1," the first frame received is moved to receive buffer 2 and receive buffer 1 can receive the next frame successively. As data is moved from receive buffer 1 to receive buffer 2, the receive buffer full flag SC0MOD2 is set to "1" and the INTRX0 interrupt is generated. While data is in receive buffer 2, if CPU/DMAC cannot read data from receive buffer 2 in time before completing reception of the next 8 bits, the INTRX0 interrupt is not generated and the SCLK0 clock stops. In this state, reading data from receive buffer 2 allows data in receive buffer 1 to move to receive buffer 2 and thus the INTRX0 interrupt is generated and data reception resumes.
Receive data write timing SCLK0 output RXD0 (INTRX0 interrupt request) bit 0 bit 1 bit 6 bit 7 bit 0
= "0" (if double buffering is disabled)
Receive data read timing SCLK0 output RXD0
(INTRX0 interrupt request)
bit7
bit 0
bit 1
bit 6
bit 7
bit 0
RBFULL
= "1" (if double buffering is enabled) (if data is read from buffer 2)
TMP19A64(rev1.1)-13-32
TMP19A64C1D
Receive data read timing SCLK0 output RXD0
(INTRX0 interrupt request)
bit 7
bit 0
bit 1
bit 6
bit 7
RBFULL
= "1" (if double buffering is enabled) (if data cannot be read from buffer 2) Fig. 13.5.1.3 Receive Operation in the I/O Interface Mode (SCLK0 Output Mode)
SCLK input mode In the SCLK input mode, since receive double buffering is always enabled, the received frame can be moved to receive buffer 2 and receive buffer 1 can receive the next frame successively. The INTRX receive interrupt is generated each time received data is moved to received buffer 2.
Receive data read timing SCLK0 input (=0 rising edge mode) SCLK0 input (=1 falling edge mode) RXD0
(INTRX0 interrupt request)
bit 0
bit 1
bit 5
bit 6
bit 7
bit 0
RBFULL
If data is read from buffer 2
Receive data read timing SCLK0 input (=0 rising edge mode) SCLK0 input (=1 falling edge mode) RXD0
(INTRX0 interrupt request)
bit 0
bit 1
bit 5
bit 6
bit 7
bit 0
RBFULL OERR
If data cannot be read from buffer 2 Fig. 13.5.1.4 Receive Operation in the I/O Interface Mode (SCLK0 Input Mode) (Note) To receive data, SC0MOD must always be set to "1" (receive enable) regardless of the SCLK input or output mode.
TMP19A64(rev1.1)-13-33
TMP19A64C1D
Send and receive (full-duplex) The full-duplex mode is enabled by setting bit 6 of the serial mode control register 1 (SC0MOD1) to "1." SCLK output mode In the SCLK output mode, if SC0MOD2 is set to "0" and both the send and receive double buffers are disabled, SCLK is output when the CPU writes data to the send buffer. Subsequently, 8 bits of data are shifted into receive buffer 1 and the INTRX0 receive interrupt is generated. Concurrently, 8 bits of data written to the send buffer are output from the TXD0 pin, the INTTX0 send interrupt is generated when transmission of all data bits has been completed. Then, the SCLK output stops. In this, the next round of data transmission and reception starts when the data is read from the receive buffer and the next send data is written to the send buffer by the CPU. The order of reading the receive buffer and writing to the send buffer can be freely determined. Data transmission is resumed only when both conditions are satisfied. If SC0MOD2 = "1" and double buffering is enabled for both transmission and reception, SCLK is output when the CPU writes data to the send buffer. Subsequently, 8 bits of data are shifted into receive buffer 1, moved to receive buffer 2, and the INTRX0 interrupt is generated. While 8 bits of data is received, 8 bits of transmit data is output from the TXD0 pin. When all data bits are sent out, the INTTX0 interrupt is generated and the next data is moved from the send buffer 2 to send buffer 1. If send buffer 2 has no data to be moved to send buffer 1 (SC0MOD2 = 1) or when receive buffer 2 is full (SC0MOD2 = 1), the SCLK clock is stopped. When both conditions are satisfied, i.e., receive data is read and send data is written, the SCLK output is resumed and the next round of data transmission is started.
Receive data read timing Transmit data write timing SCLK0 output TXD0 RXD0 (INTTX0 interrupt request) (INTRX0 interrupt request) bit 0 bit 0 bit 1 bit 1 bit 5 bit 5 bit 6 bit 6 bit 7 bit 7 bit 0 bit 0 bit 1 bit 1
= "0" (if double buffering is disabled)
TMP19A64(rev1.1)-13-34
TMP19A64C1D
Receive data read timing Transmit data write timing SCLK0 output TXD0 RXD0
(INTTX0 interrupt request)
bit 0 bit 0
bit 1 bit 1
bit 5 bit 5
bit 6 bit 6
bit 7 bit 7
bit 0 bit 0
bit 1 bit 1
(INTRX0 interrupt request)
= "1" (if double buffering is enabled)
Receive data read timing Transmit data write timing SCLK0 output TXD0 RXD0
(INTTX0 interrupt request)
bit 0 bit 0
bit 1 bit 1
bit 5 bit 5
bit 6 bit 6
bit 7 bit 7
(INTRX0 interrupt request)
= "1" (if double buffering is enabled) Fig. 13.5.1.5 Send/Receive Operation in the I/O Interface Mode (SCLK0 Output Mode)
TMP19A64(rev1.1)-13-35
TMP19A64C1D
SCLK input mode In the SCLK input mode with SC0MOD2 set to "0" and the send double buffers are disabled (double buffering is always enabled for the receive side), 8-bit data written in the send buffer is output from the TXD0 pin and 8 bits of data is shifted into the receive buffer when the SCLK0 input becomes active. The INTTX0 interrupt is generated upon completion of data transmission and the INTRX0 interrupt is generated at the instant the received data is moved from receive buffer 1 to receive buffer 2. Note that transmit data must be written into the send buffer before the SCLK input for the next frame (data must be written before the point A in Fig. 13.5.1.6). As double buffering is enabled for data reception, data must be read before completing reception of the next frame data. If SC0MOD2 = "1" and double buffering is enabled for both transmission and reception, the interrupt INTRX0 is generated at the timing send buffer 2 data is moved to send buffer 1 after completing data transmission from send buffer 1. At the same time, the 8 bits of data received is shifted to buffer 1, moved to receive buffer 2, and the INTRX0 interrupt is generated. Upon the SCLK input for the next frame, transmission from send buffer 1 (in which data has been moved from send buffer 2) is started while receive data is shifted into receive buffer 1 simultaneously. If data in receive buffer 2 has not been read when the last bit of the frame is received, an overrun error occurs. Similarly, if there is no data written to send buffer 2 when SCLK for the next frame is input, an under-run error occurs. A
Receive data read timing Transmit data write timing SCLK0 input
TXD0 RXD0
(INTTX0 interrupt request) (INTRX0 interrupt request)
bit 0 bit 0
bit 1 bit 1
bit 5 bit 5
bit 6 bit 6
bit 7 bit 7
bit 0 bit 0
bit 1 bit 1
= "0" (if double buffering is disabled)
TMP19A64(rev1.1)-13-36
TMP19A64C1D
Receive data read timing Transmit data write timing SCLK0 inp
TXD0 RXD0
(INTTX0 interrupt request)
bit 0 bit 0
bit 1 bit 1
bit 5 bit 5
bit 6 bit 6
bit 7 bit 7
bit 0 bit 0
bit 1 bit 1
INTRX0 interrupt request)
= "1" (if double buffering is enabled) (no errors)
Receive data read timing Transmit data write timing SCLK0 input
TXD0 RXD0
(INTTX0 interrupt request)
bit 0 bit 0
bit 1 bit 1
bit 5 bit 5
bit 6 bit 6
bit 7 bit 7
bit 0 bit 0
bit 1 bit 1
(INTRX0 interrupt request)
PERR (under-run error)
= "1" (if double buffering is enabled) (error generation) Fig. 13.5.1.6 Send/Receive Operation in the I/O Interface Mode (SCLK0 Input Mode)
TMP19A64(rev1.1)-13-37
TMP19A64C1D
13.5.2
Mode 1 (7-bit UART Mode)
The 7-bit UART mode can be selected by setting the serial mode control register (SC0MOD ) to "01." In this mode, parity bits can be added to the transmit data stream; the serial mode control register (SC0CR ) controls the parity enable/disable setting. When is set to "1" (enable), either even or odd parity may be selected using the SC0CR bit. The length of the stop bit can be specified using SC0MOD2. Example: The control register settings for transmitting in the following data format are listed in the following table.
start bit 0 1 2 3 4 5 6 even parity stop
Transmission direction (Transmission rate of 2400bps, @fc =24.576MHz)
* Clocking conditions System clock High-speed clock gear Prescaler clock : High-speed (fc) : x 1 (fc) : fperiph/4 (fperiph = fsys)
76543210 PCCR PCFC

SC0MOD SC0CR X11XXX00 BR0CR 00101010 IMC3 -11-0100 SC0BUF * * * * * * * * Note: X: don't care - : no change
-------1 -------1 X0-X0101
Designates PC0 as the TXD0 pin. Sets the 7-bit UART mode. Adds even parity. Sets the data rate to 2400 bps. Enables the INTTX0 interrupt and sets to level 4 by the <31:24> bits of the 32 bit register. Sets the data to be sent.
13.5.3
Mode 2 (8-bit UART Mode)
The 8-bit UART mode can be selected by setting SC0MOD0 to "10." In this mode, parity bits can be added and parity enable/disable is controlled using SC0CR . If = "1" (enabled), either even or odd parity can be selected using SC0CR . Example: The control register settings for receiving data in the following format are as follows:
start bit 0 1 2 3 4 5 6 7 odd parity stop
Transmission direction (Transmission rate of 9600bps, @fc =24.576MHz)
* Clocking conditions System clock High-speed clock gear Prescaler clock : High-speed (fc) : x 1 (fc) : fperiph/4 (fperiph = fsys)
TMP19A64(rev1.1)-13-38
TMP19A64C1D
Main routine settings

PCCR PCFC
76543210 ------0-
SC0MOD SC0CR X01XXX00 BR0CR 00010101 IMC3 -11-0100 SC0MOD
------1- -00X1001
Designates PC1 as the RXD0 pin. Selects the 8-bit UART mode. Sets odd parity. Sets the data rate to 9600 bps. Enables the INTRX0 interrupt and sets to level 4 by the <23:16> bits of the 32 bit register. Enables reception of data.
--1X----
An example interrupt routine process
INTCLR 000111000 Reg. SC0CR AND 0x1C if reg. is not "0" then error processing Set SC0BUF to Reg. Interrupt processing is completed Note: X: don't care - : no change
Clears the interrupt request. 0x0000_0038 Performs error check Reads received data.
Interrupt process start
INTCLR=0x38
No SC0CR=0x1C ? Yes SC0BUF data read
Error processing
Interrupt process complete
TMP19A64(rev1.1)-13-39
TMP19A64C1D
13.5.4
Mode 3 (9-bit UART)
The 9-bit UART mode can be selected by setting SC0MOD0 to "11." In this mode, parity bits must be disabled (SC0CR = "0"). The most significant bit (9th bit) is written to bit 7 of the serial mode control register 0 (SC0MOD0) for transmit data and it is stored in bit 7 of the serial control register SC0CR upon receiving data. When writing or reading data to/from the buffers, the most significant bit must be written or read first before writing or reading to/from SC0BUF. The stop bit length can be specified using SC0MOD2 . Wakeup function In the 9-bit UART mode, slave controllers can be operated in the wake-up mode by setting the wake-up function control bit SC0MOD0 to "1." In this case, the interrupt INTRX0 will be generated only when SC0CR is set to "1."
TXD
RXD
TXD
RXD
TXD
RXD
TXD
RXD
Master
Slave 1
Slave 2
Slave 3
(Note)
The TXD pin of the slave controller must be set to the open drain output mode using the ODE register. Fig. 13.5.4.1 Serial Links to Use Wake-up Function
TMP19A64(rev1.1)-13-40
TMP19A64C1D
Protocol Select the 9-bit UART mode for the master and slave controllers. Set SC0MOD to "1" for the slave controllers to make them ready to receive data. The master controller is to send a single frame of data that includes the slave controller select code (8 bits). In this, the most significant bit (bit 8) must be set to "1."
start bit 0 1 2 3 4 5 6 7 8 "1" stop
Slave controller select code
Every slave controller receives the above data frame; if the code received matches with the controller's own select code, it clears the WU bit to "0." The master controller transmits data to the designated slave controller (the controller of which SC0MOD bit is cleared to "0"). In this, the most significant bit (bit 8) must be set to "0."
start bit 0 1 2 3 data 4 5 6 7 bit 8 "0" stop
The slave controllers with the bit set to "1" ignore the receive data because the most significant bit (bit 8) is set to "0" and thus no interrupt (INTRX0) is generated. Also, the slave controller with the bit set to "0" can transmit data to the master controller to inform that the data has been successfully received. Example setting: Using the internal clock fsys/2 as the transfer clock, two slave controllers are serially linked as follows:
TXD
RXD Master
TXD
RXD
TXD
RXD
Slave 1 Select code 00000001
Slave 2 Select code 00001010
TMP19A64(rev1.1)-13-41
TMP19A64C1D
Master controller setting
Main routine PCCR PCFC IMC3

------01 ------11 -11-0101 -11-0100
Designates PC0/PC1 as the TXD0/RXD0 pins, respectively. Enables the INTRX0 interrupt and sets to level 5 by the <23:16> bits of the 32 bit register. Enables the INTTX0 interrupt and sets to level 4 by the <31:24> bits of the 32 bit register. Sets the 9-bit UART mode and fsys/2 transfer clock. Sets the select code of Slave 1.
SC0MOD0 1 0 1 0 1 1 1 0 SC0BUF 00000001 Interrupt routine (INTTX0) INTCLR 000111100 SC0MOD0 0 - - - - - - - SC0BUF ******** Interrupt processing is completed.
Clears the interrupt request. (0x0000_003C) Sets TB8 to "0." Sets the data to be sent.
Slave controller setting
Main routine PCCR PCFC PCODE IMC3

SC0MOD0 0 0 1 1 1 1 1 0 Interrupt routine (INTRX0) INTCLR 000111000 Reg. SC0BUF if Reg. = select code, Then SC0MOD0 - - - 0 - - - -
- - - - -
---- ---- ---- 11-0 11-0
-01 -11 --1
110 101
Designates PC0 as TXD (open drain output) and PC1 as RXD. Enables INTTX0 and INTRX0. Sets the 9-bit UART mode and fSYS/2 transfer clock and sets to "1."
Clears the interrupt request.
Clears to "0."
TMP19A64(rev1.1)-13-42
TMP19A64C1D
14. Serial Bus Interface (SBI)
The TMP19A64 contains a Serial Bus Interface (SBI) channel, which has the following two operating modes: * * I C bus mode (with multi-master capability) Clock-synchronous 8-bit SIO mode
2 2
In the I C bus mode, the SBI is connected to external devices via PF0 (SDA) and PF1 (SCL). In the clocksynchronous 8-bit SIO mode, the SBI is connected to external devices via PF2 (SCK), PF0 (SO) and PF1 (SI). The following table shows the programming required to put the SBI in each operating mode.
PFODE PFCR PFFC
I2C bus mode Clock-synchronous 8-bit SIO mode X: Don't care
11 XX
X11 101 (clock output) 001 (clock input)
011 111
14.1 Configuration
The configuration is shown in Fig. 14.1.
INTSBI interrupt request Noise canceller SCL SCK SIO clock control PF2 (SCK) Input/ output control SIO Transfer control circuit data control PF0 SO SI (SO/SDA)
fsys/4
Frequency divider
2
I C bus clock synchronization + control
PF1 Shift register I C bus data control
2
(SI/SCL) Noise canceller SDA
SBICR2/ SBISR SBI control register 2/ SBI status register
2
I2CAR I C bus address register
SBIDBR SBI data buffer register
SBICR0,1
SBIBR0, 1
SBI control registers SBI baud rate registers 0 and 1 0 and 1
Fig. 14.1 SBI Block Diagram
TMP19A64(rev1.1)-14-1
TMP19A64C1D
14.2 Control
The following registers control the serial bus interface and provide its status information for monitoring. * * * * * * * Serial bus interface control register 0 (SBICR0) Serial bus interface control register 1 (SBICR1) Serial bus interface control register 2 (SBICR2) Serial bus interface buffer register (SBIDBR) I2C bus address register (I2CAR) Serial bus interface status register (SBISR) Serial bus interface baud rate register 0 (SBIBR0)
The functions of these registers vary, depending on the mode in which the SBI is operating. For a detailed 2 description of the registers, refer to "14.5 Control in the I C Bus Mode" and "14.7 Control in the Clocksynchronous 8-bit SIO Mode."
14.3 I2C Bus Mode Data Formats
Fig. 14.3 shows the data formats used in the I2C bus mode.
(a) Addressing format 8 bits S Slave address Once 1 RA /C WK 1 to 8 bits Data 1 A C K Repeated 1 to 8 bits Data 1 A CP K
(b)
Addressing format (with repeated start condition) 8 bits S Slave address Once 1 RA /C WK 1 to 8 bits Data Repeated 1 A CS K 8 bits Slave address Once 1 RA /C WK 1 to 8 bits Data Repeated 1 A CP K
(c)
Free data format (master-transmitter to slave-receiver) 8 bits S Data Once 1 A C K 1 to 8 bits Data 1 A C K Repeated 1 to 8 bits Data 1 A CP K
Note:
S: R/W : ACK: P:
Start condition Direction bit Acknowledge bit Stop condition
2 Fig. 14.3 I C Bus Mode Data Formats
TMP19A64(rev1.1)-14-2
TMP19A64C1D
14.4 Control Registers in the I2C Bus Mode
The following registers control the serial bus interface (SBI) in the I2C bus mode and provide its status information for monitoring. Serial bus interface control register 0
7 bit Symbol SBICR0 Read/Write (0xFFFF_F257) After reset Function SBIEN R/W 0 SBI operation 0: Disable 1: Enable 0 0 0 R 0 0 0 0 6 5 4 3 2 1 0
: To use the SBI, enable the SBI operation ("1") before setting each register in the SBI module. (Note) Bits 0 to 6 of SBICRO are read as "0." Fig. 14.4.1 I2C Bus Mode Register
TMP19A64(rev1.1)-14-3
TMP19A64C1D
Serial bus interface control register 1
7 bit Symbol SBICR1 (0xFFFF_F250) Read/Write After reset Function BC2 6 BC1 R/W 0 5 BC0 4 ACK R/W 0 Acknowledgment clock
0: Not generate 1: Generate
3
2 SCK2
1 SCK1 R/W
0
SCK0/ SWRMON
0
0
R 1
0
0
R/W 1
Select the number of bits per transfer (Note 1)
Select internal SCL output clock frequency (Note 2) and reset monitor
On writing : Select internal SCL output clock frequency 265 kHz 000 n=5 201 kHz 001 n=6 System clock : fsys (=54 MHz) 136 kHz 010 n=7 Clock gear : fc/1 83 kHz 011 n=8 46 kHz 100 n=9 fsys/2 Frequency = n [Hz] 101 n=10 25 kHz 2 + 70 110 n=11 13 kHz reserved 111 On reading : Software reset status monitor 0 Software reset operation is in progress. 1 Software reset operation is not in progress. Select the number of bits per transfer 000 001 010 011 100 101 110 111 When = 0 Number of Data clock cycles length 8 8 1 1 2 2 3 3 4 4 5 5 6 6 7 7 When = 1 Number of Data clock cycles length 8 9 1 2 2 3 3 4 4 5 5 6 6 7 7 8
(Note 1) Clear to "000" before switching the operation mode to the clock-synchronous 8-bit SIO mode. (Note 2) For details on the SCL line clock frequency, refer to "14.5.3 Serial Clock." (Note 3) After a reset, the bit is read as "1." However, if the SIO mode is selected at the SBICR2 register, the initial value of the bit is "0." Fig. 14.4.2 I2C Bus Mode Register
TMP19A64(rev1.1)-14-4
TMP19A64C1D
Serial bus interface control register 2
7 bit Symbol SBICR2 Read/Write (0xFFFF_F253) After reset Function MST 0
Select master/slave 0: Slave 1: Master
6 TRX W 0
Select transmit/ receive 0: Receive 1: Transmit
5 BB 0
Start/stop condition generation 0: Stop condition generated 1: Start condition generated
4 PIN 1
Clear INTSBI interrupt request 0: - 1: Clear interrupt request
3 SBIM1 W 0
2 SBIM0 0
1 SWRST1 W 0
0 SWRST0 0
Select serial bus interface operating mode (Note 2) 00: Port mode 01: SIO mode 10: I2C bus mode 11: (Reserved)
Software reset generation Write "10" followed by "01" to generate a reset.
Select serial bus interface operating mode (Note 2) 00 Port mode (Serial bus interface output disabled) 01 Clock-synchronous 8-bit SIO mode 10 I2C bus mode 11 (Reserved)
(Note 1) Reading this register causes it to function as the SBISR register. (Note 2) Ensure that the bus is free before switching the operating mode to the port mode. Ensure that the port is at the "H" level before switching the operating mode from the port mode to the I2C bus or clock-synchronous 8-bit SIO mode. Fig. 14.4.3 I2C Bus Mode Register
Table 14.4.4 Base Clock Resolution
@fsys = 54 MHz Clock gear value 000 (fc) 100 (fc/2) 110 (fc/4) 111 (fc/8) Base clock resolution fsys/22 (0.07 s) fsys/23 (0.14 s) fsys/24 (0.28 s) fsys/25 (0.58 s)
TMP19A64(rev1.1)-14-5
TMP19A64C1D
Serial bus interface status register
7 bit Symbol SBISR (0xFFFF_F253) Read/Write After reset Function MST 0
Master/slave selection monitor 0: Slave 1: Master
6 TRX 0 Transmit/ receive selection monitor 0: Receive 1: Transmit
2
5 BB 0 I C bus state monitor 0: Free 1: Busy
4 PIN R 1 INTSBI interrupt request monitor
0: Interrupt request generated 1: Interrupt request cleared
3 AL 0 Arbitration lost detection 0: - 1: Detected
2 AAS 0 Slave address match detection 0: - 1: Detected
1 AD0 0 General call detection 0: - 1: Detected
0 LRB 0 Last received bit monitor 0: "0" 1: "1"
Last received bit monitor 0 The last bit received was "0." 1 The last bit received was "1." Addressed as slave 0 1 - Addressed as slave or general call detected - Arbitration was lost to another master
Arbitration lost 0 1
(Note)
Writing to this register causes it to function as SBICR2. Fig. 14.4.5 I2C Bus Mode Register
TMP19A64(rev1.1)-14-6
TMP19A64C1D
Serial bus interface baud rate register0
7 bit Symbol SBIBR0 Read/Write (0xFFFF_F254) After reset Function R 1 6 I2SBI R/W 0 IDLE 0: Stop 1: Operate 5 4 3 R 1 2 1 0 R/W 0 Make sure that you write "0."
1
1
1
1
Operation in the IDLE mode 0 Stop 1 Operate
Serial bus interface data buffer register
7 bit Symbol SBIDBR Read/Write (0xFFFF_F251) After reset DB7 6 DB6 5 DB5 4 DB4 3 DB3 2 DB2 1 DB1 0 DB0
R (Receive)/W (Transmit) 0
(Note)
Transmit data must be written to this register, with bit 7 being the most-significant bit (MSB).
I2C bus address register
7 I2CAR Read/Write (0xFFFF_F252) After reset Function bit Symbol SA6 6 SA5 5 SA4 4 SA3 3 SA2 2 SA1 0 1 SA0 0 0 ALS 0 Specify address recognition mode
R/W 0 0 0 0 0 Set the slave address when the SBI acts as a slave device.
Specify address recognition mode 0 Recognizes the slave address. 1 Does not recognize slave address.
Fig. 14.4.6 I2C Bus Mode Register
TMP19A64(rev1.1)-14-7
TMP19A64C1D
14.5 Control in the I2C Bus Mode
14.5.1 Setting the Acknowledgement Mode
Setting SBICR1 to "1" selects the acknowledge mode. When operating as a master, the SBI adds one clock for acknowledgment signals. As a transmitter, the SBI releases the SDA pin during this clock cycle to receive acknowledgment signals from the receiver. As a receiver, the SBI pulls the SDA pin to the "L" level during this clock cycle and generates acknowledgment signals. Setting to "0" selects the non-acknowledgment mode. When operating as a master, the SBI does not generate clock for acknowledgement signals.
14.5.2
Setting the Number of Bits per Transfer
SBICR1 specifies the number of bits of the next data to be transmitted or received. Under the start condition, is set to "000," causing a slave address and the direction bit to be transferred in a packet of eight bits. At other times, keeps a previously programmed value.
14.5.3
Serial Clock
Clock source SB SBICR1 specifies the maximum frequency of the serial clock to be output from the SCL pin in the master mode.
tHIGH tLOW 1/fscl
tLOW = 2
n-1
/(fsys/2) + 58/(fsys/2) /(fsys/2) + 12/(fsys/2)
tHIGH = 2
n-1
fscl = 1/(tLow + tHIGH) = fsys/2 2 + 70
n
SBI0CR1 000 001 010 011 100 101 110
n 5 6 7 8 9 10 11
Fig. 14.5.3.1 Clock Source The highest speeds in the standard and high-speed modes are specified to 100 KHz and 400 KHz respectively in the communications standards. Note that the internal SCL clock frequency is determined by the fsys used and the calculation formula shown above.
TMP19A64(rev1.1)-14-8
TMP19A64C1D
Clock Synchronization The I2C bus is driven by using the wired-AND connection due to its pin structure. The first master that pulls its clock line to the "L" level overrides other masters producing the "H" level on their clock lines. This must be detected and responded by the masters producing the "H" level. Clock synchronization assures correct data transfer on a bus that has two or more masters. For example, the clock synchronization procedure for a bus with two masters is shown below.
Wait for high-level period counting Start high-level period counting Internal SCL output (Master A) Reset high-level period counting
Internal SCL output (Master B)
SCL line a b c
Fig. 14.5.3.2 Example of Clock Synchronization At point a, Master A pulls its internal SCL output to the "L" level, bringing the SCL bus line to the "L" level. Master B detects this transition, resets its "H" level period counter, and pulls its internal SCL output level to the "L" level. Master A completes counting of its "L" level period at point b, and brings its internal SCL output to the "H" level. However, Master B still keeps the SCL bus line at the "L" level, and Master A stops counting of its "H" level period counting. After Master A detects that Master B brings its internal SCL output to the "H" level and brings the SCL bus line to the "H" level at point c, it starts counting of its "H" level period. This way, the clock on the bus is determined by the master with the shortest "H" level period and the master with the longest "L" level period among those connected to the bus.
14.5.4
Slave Addressing and Address Recognition Mode
When the SBI is configured to operate as a slave device, the slave address and must be set at I2CAR. Setting to "0" selects the address recognition mode
14.5.5
Configuring the SBI as a Master or a Slave
Setting SBICR2 to "1" configures the SBI to operate as a master device. Setting to "0" configures the SBI as a slave device. is cleared to "0" by the hardware when the stop condition has been detected on the bus or when arbitration has been lost.
TMP19A64(rev1.1)-14-9
TMP19A64C1D
14.5.6
Configuring the SBI as a Transmitter or a Receiver
Setting SBICR2 to "1" configures the SBI as a transmitter. Setting to "0" configures the SBI as a receiver. In the slave mode, the SBI receives the direction bit ( R/ W ) from the master device on the following occasions: * * * when data is transmitted in the addressing format when the received slave address matches the value specified at I2CCR when a general-call address is received; i.e., the eight bits following the start condition are all zeros
If the value of the direction bit ( R/ W ) is "1," is set to "1" by the hardware. If the bit is "0," is set to "0."
As a master device, the SBI receives acknowledgement from a slave device. If the direction bit of "1" is transmitted, is set to "0" by the hardware. If the direction bit is "0," changes to "1." If the SBI does not receive acknowledgement, retains the previous value is cleared to "0" by the hardware when the stop condition has been detected on the bus or when arbitration has been lost.
14.5.7
Generating Start and Stop Conditions
When SBISR is "0," writing "1" to SBICR2 causes the SBI to generate the start condition on the bus and output 8-bit data. must be set to "1" in advance.
SCL line
1 A6 Start condition
2 A5
3 A4
4 A3
5 A2
6 A1
7 A0
8 R/W
9
SDA line
Slave address and direction bit
Acknowledgment signal
Fig. 14.5.7.1 Generating the Start Condition and a Slave Address
When is "1," writing "1" to and "0" to causes the SBI to start a sequence for generating the stop condition on the bus. The contents of should not be altered until the stop condition appears on the bus.
SCL line SDA line Stop condition
Fig. 14.5.7.2 Generating the Stop Condition
SBISR can be read to check the bus state. is set to "1" when the start condition is detected on the bus (the bus is busy), and set to "0" when the stop condition is detected (the bus is free).
TMP19A64(rev1.1)-14-10
TMP19A64C1D
14.5.8
Interrupt Service Request and Release
When a serial bus interface interrupt request (INTSBI) is generated, SBICR2 is cleared to "0." While is "0," the SBI pulls the SCL line to the "L" level. After transmission or reception of one data word, is cleared to "0." It is set to "1" when data is written to or read from SBIDBR. It takes a period of tLOW for the SCL line to be released after is set to "1." In the address recognition mode ( = "0"), is cleared to "0" when the received slave address matches the value specified at I2CAR or when a general-call address is received; i.e., the eight bits following the start condition are all zeros. When the program writes "1" to SBICR2, it is set to "1." However, writing "0" does clear this bit to "0."
14.5.9
Serial Bus Interface Operating Modes
SBICR2 selects an operating mode of the serial bus interface. must be set to "10" to configure the SBI for the I2C bus mode. Make sure that the bus is free before switching the operating mode to the port mode.
14.5.10 Lost-arbitration Detection Monitor
The I2C bus has the multi-master capability (there are two or more masters on a bus), and requires the bus arbitration procedure to ensure correct data transfer. A master that attempts to generate the start condition while the bus is busy loses bus arbitration, with no start condition occurring on the SDA and SCL lines. The I2C-bus arbitration takes place on the SDA line. The arbitration procedure for two masters on a bus is shown below. Up until point a, Master A and Master B output the same data. At point a, Master A outputs the "L" level and Master B outputs the "H" level. Then Master A pulls the SDA bus line to the "L" level because the line has the wired-AND connection. When the SCL line goes high at point b, the slave device reads the SDA line data, i.e., data transmitted by Master A. At this time, data transmitted by Master B becomes invalid. In other words, Master B loses arbitration. Master B releases its SDA pin, so that it does not affect the data transfer initiated by another master. If two or more masters have transmitted exactly the same first data word, the arbitration procedure continues with the second data word.
SCL line Internal SDA output (Master A) Internal SDA output (Master B) SDA line a b Loses arbitration and sets the internal SDA output to "1."
Fig. 14.5.10.1 Lost Arbitration
TMP19A64(rev1.1)-14-11
TMP19A64C1D
A master compares the SDA bus line level and the internal SDA output level at the rising of the SCL line. If there is a difference between these two values, the master loses arbitration and sets SBI0SR to "1." When is set to "1," SBISR are cleared to "0," causing the SBI to operate as a slave receiver. is cleared to "0" when data is written to or read from SBIDBR or data is written to SBICR2.
Internal SCL output Master A 1 D7A 2 D6A 3 D5A 4 D4A 5 D3A 6 D2A 7 D1A 8 D0A 9 1 2 3 4
Internal SDA output Internal SCL output
D7A' D6A' D5A' D4A'
Clock output stops here 1 D7B 2 D6B 3 4 Internal SDA output is held high because Master B has lost arbitraiton.
Master B
Internal SDA output
Access to SBIDBR or SBICR2
Fig. 14.5.10.2 Example of Master B Losing Arbitration (D7A = D7B, D6A = D6B)
14.5.11 Slave Address Match Detection Monitor
When the SBI operates as a slave device in the address recognition mode (I2CCR = "0"), SBISR is set to "1" on receiving the general-call address or the slave address that matches the value specified at I2CCR. When is "1," is set to "1" when the first data word has been received. is cleared to "0" when data is written to or read from SBIDBR.
14.5.12 General-call Detection Monitor
When the SBI operates as a slave device, SBISR is set to "1" when it receives the general-call address; i.e., the eight bits following the start condition are all zeros. is cleared to "0" when the start or stop condition is detected on the bus.
14.5.13 Last Received Bit Monitor
SBISR is set to the SDA line value that was read at the rising of the SCL line. In the acknowledgment mode, reading SBISR immediately after generation of the INTSBI interrupt request causes ACK signal to be read.
TMP19A64(rev1.1)-14-12
TMP19A64C1D
14.5.14 Software Reset
If the serial bus interface circuit locks up due to external noise, it can be initialized by using a software reset. Writing "10" followed by "01" to SBICR2 generates a reset signal that initializes the serial bus interface circuit. After a reset, all control registers and status flags are initialized to their reset values. When the serial bus interface is initialized, is automatically cleared to "0."
(Note) After a software reset, the operating mode is also reset from the I2C mode to the synchronous communication mode.
14.5.15 Serial Bus Interface Data Buffer Register (SBIDBR)
Reading or writing SBIDBR initiates reading received data or writing transmitted data. When the SBI is acting as a master, setting a slave address and a direction bit to this register generates the start condition.
14.5.16 I2C Bus Address Register (I2CAR)
When the SBI is configured as a slave device, the I2CAR bit is used to specify a slave address. If I2C0AR is set to "0," the SBI recognizes a slave address transmitted by the master device and receives data in the addressing format. If is set to "1," the SBI does not recognize a slave address and receives data in the free data format.
14.5.17 IDLE Setting Register (SBIBR0)
The SBIBR0 register determines if the SBI operates or not when it enters the IDLE mode. This register must be programmed before executing an instruction to switch to the standby mode.
TMP19A64(rev1.1)-14-13
TMP19A64C1D
14.6 Data Transfer Procedure in the I2C Bus Mode
14.6.1 Device Initialization
First, program SBICR1 by writing "0" to bits 7 to 5 and bit 3 in SBICR1. Next, program I2CAR by specifying a slave address at and an address recognition mode at . ( must be set to "0" when using the addressing format.) Next, program SBICR2 to initially configure the SBI in the slave receiver mode by writing "0" to , "1" to , "10" to and "0" to bits 1 and 0.
76 SBICR1 0 0 I2CAR XX SBICR2 0 0 (Note) X: Don't care 5 0 X 0 4 X X 1 3 0 X 1 2 X X 0 1 X X 0 0 X X 0
Specifies ACK and SCL clock. Specifies a slave address and an address recognition mode. Configures the SBI as a slave receiver.
14.6.2
Generating the Start Condition and a Slave Address
Master mode In the master mode, the following steps are required to generate the start condition and a slave address. First, ensure that the bus is free ( = "0"). Then, write "1" to SBICR1 to select the acknowledgment mode. Write to SBIDBR a slave address and a direction bit to be transmitted. When = "0," writing "1111" to SBICR2 generates the start condition on the bus. Following the start condition, the SBI generates nine clocks from the SCL pin. The SBI outputs the slave address and the direction bit specified at SBIDBR with the first eight clocks, and releases the SDA line in the ninth clock to receive an acknowledgment signal from the slave device. The INTSBI interrupt request is generated on the falling of the ninth clock, and is cleared to "0." In the master mode, the SBI holds the SCL line at the "L" level while is "0." changes its value according to the transmitted direction bit at generation of the INTSBI interrupt request, provided that an acknowledgment signal has been returned from the slave device. Settings in main routine
Reg. Reg. if Reg. Then SBICR1 SBIDR1 SBICR2 76543210 SBISR Reg. e 0x20 0x00
XXX10XXX XXXXXXXX 11111000
Ensures that the bus is free. Selects the acknowledgement mode. Specifies the desired slave address and direction. Generates the start condition.
Example of INTSBI interrupt routine
INTCLR 0x50 Processing End of interrupt
Clears the interrupt request.
TMP19A64(rev1.1)-14-14
TMP19A64C1D
Slave mode
In the slave mode, the SBI receives the start condition and a slave address. After receiving the start condition from the master device, the SBI receives a slave address and a direction bit from the master device during the first eight clocks on the SCL line. If the received address matches its slave address specified at I2CAR or is equal to the general-call address, the SBI pulls the SDA line to the "L" level during the ninth clock and outputs an acknowledgment signal. The INTSBI interrupt request is generated on the falling of the ninth clock, and is cleared to "0." In the slave mode, the SBI holds the SCL line at the "L" level while is "0."
(Note) The user can only use a DMA transfer: * when there is only one master and only one slave and * continuous transmission or reception is possible.
SCL SDA
1 A6 Start condition
2 A5
3 A4
4 A3
5 A2
6 A1
7 A0
8
9 ACK Acknowledgement from slave
R/ W
Slave address + Direction bit
INTSBI
interrupt request Master to slave Slave to master
Fig. 14.6.2.1 Generation of the Start Condition and a Slave Address
14.6.3
Transferring a Data Word
At the end of a data word transfer, the INTSBI interrupt is generated to test to determine whether the SBI is in the master or slave mode. Master mode ( = "1") Test to determine whether the SBI is configured as a transmitter or a receiver. Transmitter mode ( = "1") Test . If is "1," that means the receiver requires no further data. The master then generates the stop condition as described later to stop transmission. If is "0," that means the receiver requires further data. If the next data to be transmitted has eight bits, the data is written into SBIDBR. If the data has different length, and are programmed and the transmit data is written into SBIDBR. Writing the data makes to"1," causing the SCL pin to generate a serial clock for transfer of a next data word, and the SDA pin to transfer the data word. After the transfer is completed, the INTSBI interrupt request is generated, is set to "0," and the SCL pin is pulled to the "L" level. To transmit more data words, test again and repeat the above procedure.
TMP19A64(rev1.1)-14-15
TMP19A64C1D
INTSBI interrupt
if MST = 0 Then go to the slave-mode processing if TRX = 0 Then go to the receiver-mode processing if LRB = 0 Then go to processing for generating the stop condition
SBICR1
XXXX0XXX
SBIDBR X X X X X X X X End of interrupt processing (Note) X: Don't care 1 D7 2 D6 3 D5
Specifies the number of bits to be transmitted and specify whether ACK is required. Writes the transmit data.
SCL pin Write to SBI0DBR SDA pin
4 D4
5 D3
6 D2
7 D1
8 D0
9 ACK
Acknowledgment signal from receiver
INTSBI interrupt request
Master to slave Slave to master
Fig. 14.6.3.1 = "000" and = "1" (Transmitter Mode)
Receiver mode ( = "0") If the next data to be transmitted has eight bits, the transmit data is written into SBIDBR. If the data has different length, and are programmed and the received data is read from SBIDBR to release the SCL line. (The data read immediately after transmission of a slave address is undefined.) On reading the data, is set to "1," and the serial clock is output to the SCL pin to transfer the next data word. In the last bit, when the acknowledgment signal becomes the "L" level, "0" is output to the SDA pin. After that, the INTSBI interrupt request is generated, and is cleared to "0," pulling the SCL pin to the "L" level. Each time the received data is read from SBIDBR, one-word transfer clock and an acknowledgement signal are output.
Read the received data SCL 1 D7 2 D6 3 D5 4 D4 5 D3 6 D2 7 D1 8 D0 9 ACK Next D7
Acknowledgment signal to transmitter
SDA
INTSBI interrupt request
Master to slave Slave to master
Fig. 14.6.3.2 = "000" and = "1" (Receiver Mode)
TMP19A64(rev1.1)-14-16
TMP19A64C1D
To terminate the data transmission from the transmitter, must be set to "0" immediately before reading the second to last data word. This disables generation of an acknowledgment clock for the last data word. When the transfer is completed, an interrupt request is generated. After the interrupt processing, must be set to "001" and the data must be read so that a clock is generated for 1bit transfer. At this time, the master receiver holds the SDA bus line at the "H" level, which signals the end of transfer to the transmitter as an acknowledgment signal. In the interrupt processing for terminating the reception of 1-bit data, the stop condition is generated to terminate the data transfer.
SCL 9 1 D7 2 D6 3 D5 4 D4 5 D3 6 D2 7 D1 8 D0 1
SDA
Acknowledgment signal H to transmitter
INTSBI interrupt request Read out the received data after clearing to "0."
Read out the received data after setting to "001." Master to slave Slave to master
Fig. 14.6.3.3 Terminating Data Transmission in the Master Receiver Mode
Example: When receiving N data words INTSBI interrupt (after data transmission)
SBICR1 76543210 XXXX0XXX
Reg. SBI0CBR End of interrupt
Sets the number of bits of data to be received and specify whether ACK is required. Reads dummy data.
INTSBI interrupt (first to (N-2)th data reception)
76543210 Reg. SBIDBR End of interrupt
Reads the first to (N-2)th data words.
INTSBI interrupt ( (N-1)th data reception)
76543210 SBI0CR1 X X X 0 0 X X X Reg. SBIDBR End of interrupt
Disables generation of acknowledgement clock. Reads the (N-1)th data word.
INTSBI interrupt (Nth data reception)
76543210 SBI0CR1 0 0 1 0 0 X X X Reg. SBIDBR End of interrupt
Generates a clock for 1-bit transfer. Reads the Nth data word.
INTSBI interrupt (after completing data reception)
Processing to generate the stop condition End of interrupt
(Note) X: Don't care
Terminates the data transmission.
TMP19A64(rev1.1)-14-17
TMP19A64C1D
Slave mode ( = "0") In the slave mode, the SBI generates the INTSBI interrupt request on four occasions: 1) when the SBI has received any slave address from the master, 2) when the SBI has received a general-call address, 3) when the received slave address matches its own address, and 4) when a data transfer has been completed in response to a general-call. Also, if the SBI loses arbitration in the master mode, it switches to the slave mode. Upon the completion of data word transfer in which arbitration is lost, the INTSBI interrupt request is generated, is cleared to "0," and the SCL pin is pulled to the "L" level. When data is written to or read from SBIDBR or when is set to "1," the SCL pin is released after a period of tLOW. In the slave mode, the normal slave mode processing or the processing as a result of lost arbitration is carried out. SBISR , , and are tested to determine the processing required. Table 14.6.3.4 shows the slave mode states and required processing. Example: When the received slave address matches the SBI's own address and the direction bit is "1" in the slave receiver mode INTSBI interrupt
if TRX = 0 Then go to other processing if AL = 1 Then go to other processing if AAS = 0 Then go to other processing SBICR1 X X X 1 0 X X X SBIDBR X X X X 0 X X X
(Note) X: Don't care
Sets the number of bits to be transmitted. Sets the transmit data.
TMP19A64(rev1.1)-14-18
TMP19A64C1D
Table 14.6.3.4 Processing in Slave Mode
1 1 1 0 State Arbitration was lost while the slave address was being transmitted, and the SBI received a slave address with the direction bit "1" transmitted by another master. In the slave receiver mode, the SBI received a slave address with the direction bit "1" transmitted by the master. In the slave transmitter mode, the SBI has completed a transmission of one data word. Processing Set the number of bits in a data word to and write the transmit data into SBI0DBR.
0
1
0
0
0
0
1
1
1/0
0
0
0
1
1/0
0
1/0
Test LRB. If it has been set to "1," that means the receiver does not require further data. Set to 1 and reset to 0 to release the bus. If has been reset to "0," that means the receiver requires further data. Set the number of bits in the data word to and write the transmit data to the SBIDBR. Read the SBIDBR (a dummy read) to Arbitration was lost while a slave address was being transmitted, and the set to 1, or write "1" to . SBI received either a slave address with the direction bit "0" or a generalcall address transmitted by another master. Arbitration was lost while a slave address or a data word was being transmitted, and the transfer terminated. In the slave receiver mode, the SBI received either a slave address with the direction bit "0" or a general-call address transmitted by the master. In the slave receiver mode, the SBI has Set the number of bits in the data word completed a reception of a data word. to and read the received data from SBIDBR.
TMP19A64(rev1.1)-14-19
TMP19A64C1D
14.6.4
Generating the Stop Condition
When SBISR is "1," writing "1" to SBICR2 and "0" to causes the SBI to start a sequence for generating the stop condition on the bus. Do not alter the contents of until the stop condition appears on the bus. If another device is holding down the SCL bus line, the SBI waits until the SCL line is released. After that, the SDA pin goes high, causing the stop condition to be generated.
76543210 11011000
SBICR2
Generates the stop condition.
"1" "1" "0" "1" SCL pin SDA pin
Stop condition
(read)
Fig. 14.6.4.1 Generating the Stop Condition
TMP19A64(rev1.1)-14-20
TMP19A64C1D
14.6.5
Repeated Start Procedure
Repeated start is used when a master device changes the data transfer direction without terminating the transfer to a slave device. The procedure of generating a repeated start in the master mode is described below. First, set SBICR2 to "0" and write "1" to to release the bus. At this time, the SDA pin is held at the "H" level and the SCL pin is released. Because no stop condition is generated on the bus, other devices think that the bus is busy. Then, test SBISR and wait until it becomes "0" to ensure that the SCL pin is released. Next, test and wait until it becomes "1" to ensure that no other device is pulling the SCL bus line to the "L" level. Once the bus is determined to be free this way, use the steps described above in (2) to generate the start condition. To satisfy the setup time of repeated start, at least 4.7-s wait period (in the standard mode) must be created by the software after the bus is determined to be free.
76543210 SBICR2 0 0 0 1 1 0 0 0 if SBISR 0 Then if SBISR 1 Then 4.7 s Wait SBICR1 X X X 1 0 X X X SBIDBR X X X X X X X X SBICR2 1 1 1 1 1 0 0 0
(Note) X: Don't care
Releases the bus. Checks that the SCL pin is released. Checks that no other device is pulling the SCL pin to the "L" level.
Selects the acknowledgment mode. Sets the desired slave address and direction. Generates the start condition.
"0" "0" "0" "1"
"1" "1" "1" "1" 4.7 s (min.) Start condition
SCL (bus) SCL pin SDA pin 9

(Note)
Do not write to "0" when it is "0." (Repeated start cannot be done.) Fig. 14.6.5.1 Timing Chart of Generating a Repeated Start
TMP19A64(rev1.1)-14-21
TMP19A64C1D
14.7 Control in the Clock-synchronous 8-bit SIO Mode
The following registers control the serial bus interface in the clock-synchronous 8-bit SIO mode and provide its status information for monitoring.
Serial bus interface control register 0
7 bit Symbol SBICR0 Read/Write (0xFFFF_F257) After reset Function SBIEN R/W 0 SBI operation 0: Disable 1: Enable R 0 0 0 0 0 0 0 6 5 4 3 2 1 0
: To use the SBI, enable the SBI operation ("1") before setting each register of SBI module. (Note) Bits 0 to 6 of SBICRO are read as "0." Serial bus interface control register 1
7 SBICR1 (0xFFFF_F250) Read/Write After reset Function bit Symbol SIOS 0 6 SIOINH R/W 0 0 0
Start transfer Abort transfer 0: Stop 0: Continue 1: Start 1: Abort Select transfer mode 00: Transmit mode 01: (Reserved) 10: Transmit/receive mode 11: Receive mode
5 SIOM1
4 SIOM0
3 R 1
2 SCK2 R/W 0
1 SCK1 0
0 SCK0 R/W 1
Select serial clock frequency
On writing : Select serial clock frequency 000 n = 4 1.69 MHz System clock : fsys 001 n = 5 844 kHz (=54 MHz) 010 n = 6 422 kHz Clock gear : fc/1 011 n = 7 211 kHz fsys/2 Frequency = [Hz] n 100 n = 8 105 kHz
2
101 n = 9 110 n =10 111
53 kHz 26 kHz External clock
(Note) (Note)
Set to "0" and to "1" before programming the transfer mode and the serial clock. After a reset, the bit is read as "1." If the SIO mode is selected at the SBICR2 register, the initial value of the bit becomes "0."
TMP19A64(rev1.1)-14-22
TMP19A64C1D
Serial bus interface data buffer register
SBIDBR (0xFFFF_F251) bit Symbol Read/Write After reset 7 DB7 6 DB6 5 DB5 4 3 2 DB2 1 DB1 0 DB0 DB4 DB3 R (Receive)/W (Transmit) 0
Fig. 14.7.1.1 SIO Mode Registers
Serial bus interface control register 2
7 SBICR2 Read/Write (0xFFFF_F253) After reset Function bit Symbol 6 R 1 1 1 1 0 5 4 3 SBIM1 W 0 1
Select serial bus interface operating mode 00: Port mode 01: Clock-synchronous 8-bit SIO mode 10: I2C bus mode 11: (Reserved)
2 SBIM0
1 R
0
1
Serial bus interface register
7 SBISR (0xFFFF_F253) bit Symbol Read/Write After reset Function 1 1 6 R 1 1 0
Serial transfer status monitor
0: Terminated 1: In progress
5
4
3 SIOF R
2 SEF
1 R
0
0
Shift operation status monitor
0: Terminated 1: In progress
1
1
Serial bus interface baud rate register 0
7 SBIBR0 Read/Write (0xFFFF_F254) After reset Function bit Symbol R 1 6 I2SBI R/W 0 IDLE 0: Stop 1: Operate 1 1 R 1 1 1 R/W 0 Make sure that you write "0." 5 4 3 2 1 0
Fig. 14.7.1.2 SIO Mode Registers
TMP19A64(rev1.1)-14-23
TMP19A64C1D
14.7.1
Serial Clock
Clock source Internal or external clocks can be selected by programming SBICR1 . Internal clocks In the internal clock mode, one of the seven frequencies can be selected as a serial clock, which is output to the outside through the SCK pin. At the beginning of a transfer, the SCK pin output becomes the "H" level. If the program cannot keep up with this serial clock rate in writing the transmit data or reading the received data, the SBI automatically enters a wait period. During this period, the serial clock is stopped automatically and the next shift operation is suspended until the processing is completed.
Automatic wait SCK pin output 1 2 3 7 8 1 2 6 7 8 1 2 3
SO pin output Write the transmit data
a0
a1
a2 a5
a6
a7
b0
b1 b4
b5
b6
b7
c0
c1
c2
a
b
c
Fig. 14.7.1.3 Automatic Wait
External clock ( = "111") The SBI uses an external clock supplied from the outside to the SCK pin as a serial clock. For proper shift operations, the serial clock at the "H" and "L" levels must have the pulse widths as shown below.
SCK pin
tSCK tSCKH tSCKL, tSCKH > 8/fsys
Fig. 14.7.1.4 Maximum Transfer Frequency of External Clock Input
TMP19A64(rev1.1)-14-24
TMP19A64C1D
Shift Edge Leading-edge shift is used in transmission. Trailing-edge shift is used in reception. Leading-edge shift Data is shifted at the leading edge of the serial clock (or the falling edge of the SCK pin input/output). Trailing-edge shift Data is shifted at the trailing edge of the serial clock (or the rising edge of the SCK pin input/output).
SCK pin bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7
SO pin
Shift register
76543210 *7654321 **765432
***76543
****7654
*****765
******76
******7
(a) Leading-edge shift
SCK pin bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7
SI pin
Shift register
********
0*******
10******
210*****
3210****
43210***
543210** 6543210* 76543210
(b) Trailing-edge shift
(Note) *: Don't care
Fig. 14.7.1.5 Shift Edge
TMP19A64(rev1.1)-14-25
TMP19A64C1D
14.7.2
Transfer Modes
The transmit mode, the receive mode or the transmit/receive mode can be selected by programming SBICR1 . 8-bit transmit mode Set the control register to the transmit mode and write the transmit data to SBIDBR. After writing the transmit data, writing "1" to SBICR1 starts the transmission. The transmit data is moved from SBIDBR to a shift register and output to the SO pin, with the least-significant bit (LSB) first, in synchronization with the serial clock. Once the transmit data is transferred to the shift register, SBIDBR becomes empty, and the INTSBI (buffer-empty) interrupt is generated, requesting the next transmit data. In the internal clock mode, the serial clock will be stopped and automatically enter the wait state, if next data is not loaded after the 8-bit data has been fully transmitted. The wait state will be cleared when SBIDBR is loaded with the next transmit data. In the external clock mode, SBIDBR must be loaded with data before the next data shift operation is started. Therefore, the data transfer rate varies depending on the maximum latency between when the interrupt request is generated and when SBIDBR is loaded with data in the interrupt service program. At the beginning of transmission, the same value as in the last bit of the previously transmitted data is output in a period from setting SBISR to "1" to the falling edge of SCK. Transmission can be terminated by clearing to "0" or setting to "1" in the INTSBI interrupt service program. If is cleared, remaining data is output before transmission ends. The program checks SBI0SR to determine whether transmission has come to an end. is cleared to "0" at the end of transmission. If is set to "1," the transmission is aborted immediately and is cleared to "0." In the external clock mode, must be set to "0" before the next transmit data shift operation is started. Otherwise, operation will stop after dummy data is transmitted.
SBICR1 SBIDBR SBICR1
76543210 01000XXX
XXXXXXXX 10000XXX
Selects the transmit mode. Writes the transmit data. Starts transmission.
INTSBI interrupt
SBIDBR
XXXXXXXX
Writes the transmit data.
TMP19A64(rev1.1)-14-26
TMP19A64C1D
is cleared SCK pin (output) SO pin INTSBI interrupt request SBIDBR a b (a) Internal clock
*
a0
a1
a2
a3
a4
a5
a6
a7
b0
b1
b2
b3
b4
b5
b6
b7
Write the transmit data
is cleared SCK pin (input) SO pin INTSBI interrupt request SBIDBR a b (b) External clock Write the transmit data
*
a0
a1
a2
a3
a4
a5
a6
a7
b0
b1
b2
b3
b4
b5
b6
b7
Fig. 14.7.2.1 Transmit Mode
Example: Example of programming (MIPS16) to terminate transmission by (external clock)
ADDIU STEST1 : LB AND BNEZ ADDIU STEST2 : LB AND BEQZ ADDIU STB r3, r2, r2, r3, r2, r2, r3, r0, r3 STEST1 r0, r3 STEST2 r0, 0y00000111 ; 0 0x20 ; If SCK = 0 then loop 0x04 ; If SBISR = 1 then loop
r2, (SBISR)
r2, (Px)
r3, (SBICR1)
TMP19A64(rev1.1)-14-27
TMP19A64C1D
SCK pin SIOF SO pin bit 6 bit 7 tSODH = Min. 4/fsys/2 [s]
Fig. 14.7.2.2 Transmit Data Retention Time at the End of Transmission
8-bit receive mode Set the control register to the receive mode. Then writing "1" to SBICR1 enables reception. Data is taken into the shift register from the SI pin, with the least-significant bit (LSB) first, in synchronization with the serial clock. Once the shift register is loaded with the 8-bit data, it transfers the received data to SBIDBR and the INTSBI (buffer-full) interrupt request is generated to request reading the received data. The interrupt service program then reads the received data from SBIDBR. In the internal clock mode, the serial clock will be stopped and automatically be in the wait state until the received data is read from SBIDBR. In the external clock mode, shift operations are executed in synchronization with the external clock. The maximum data transfer rate varies, depending on the maximum latency between generating the interrupt request and reading the received data. Reception can be terminated by clearing to "0" or setting to "1" in the INTSBI interrupt service program. If is cleared, reception continues until all the bits of received data are written to SBIDBR. The program checks SBISR to determine whether reception has come to an end. is cleared to "0" at the end of reception. After confirming the completion of the reception, last received data is read. If is set to "1," the reception is aborted immediately and is cleared to "0." (The received data becomes invalid, and there is no need to read it out.)
(Note)
The contents of SBIDBR will not be retained after the transfer mode is changed. The ongoing reception must be completed by clearing to "0" and the last received data must be read before the transfer mode is changed.
76543210 01110XXX
10110000
SBICR1 SBICR1
Selects the receive mode. Starts reception.
INTSBI interrupt
Reg.
SBIDBR
Reads the received data.
TMP19A64(rev1.1)-14-28
TMP19A64C1D
is cleared SCK pin (output) SI pin INTSBI interrupt request a Read the received data b Read the received data a0 a1 a2 a3 a4 a5 a6 a7 b0 b1 b2 b3 b4 b5 b6 b7
SBIDBR
Fig. 14.7.2.3 Receive Mode (Example: Internal Clock)
8-bit transmit/receive mode Set the control register to the transfer/receive mode. Then writing the transmit data to SBIDBR and setting SBICR1 to "1" enables transmission and reception. The transmit data is output through the SO pin at the falling of the serial clock, and the received data is taken in through the SI pin at the rising of the serial clock, with the least-significant bit (LSB) first. Once the shift register is loaded with the 8-bit data, it transfers the received data to SBIDBR and the INTSBI interrupt request is generated. The interrupt service program reads the received data from the data buffer register and writes the next transmit data. Because SBIDBR is shared between transmit and receive operations, the received data must be read before the next transmit data is written. In the internal clock operation, the serial clock will be automatically in the wait state until the received data is read and the next transmit data is written. In the external clock mode, shift operations are executed in synchronization with the external serial clock. Therefore, the received data must be read and the next transmit data must be written before the next shift operation is started. The maximum data transfer rate for the external clock operation varies depending on the maximum latency between generating the interrupt request and reading the received data and writing the transmit data. At the beginning of transmission, the same value as in the last bit of the previously transmitted data is output in a period from setting to "1" to the falling edge of SCK. Transmission and reception can be terminated by clearing to "0" or setting SBICR1 to "1" in the INTSBI interrupt service program. If is cleared, transmission and reception continue until the received data is fully transferred to SBIDBR. The program checks SBISR to determine whether transmission and reception have come to an end. is cleared to "0" at the end of transmission and reception. If is set, the transmission and reception are aborted immediately and is cleared to "0."
(Note) The contents of SBIDBR will not be retained after the transfer mode is changed. The ongoing transmission and reception must be completed by clearing to "0" and the last received data must be read before the transfer mode is changed.
TMP19A64(rev1.1)-14-29
TMP19A64C1D
is cleared SCK pin (output) SO pin SI pin INTSBI interrupt request a Write the transmit data (a) Read the received data (c) c b Write the transmit data (b) d Read the received data (d)
* a0
a1 c1
a2 c2
a3 c3
a4 c4
a5 c5
a6 c6
a7 c7
b0 d0
b1 d1
b2 d2
b3 d3
b4 d4
b5 d5
b6 d6
b7 d7
c0
SBIDBR
Fig. 14.7.2.4 Transmit/Receive Mode (Example: Internal Clock)
SCK pin SIOF SO pin bit 6 bit 7 of the last word transmitted tSODH = Min. 2/fsys/2 [s]
Fig. 14.7.2.5 Transmit Data Retention Time at the End of Transmission/Reception (In the Transmit/Receive Mode)
SBICR1 SBIDBR SBICR1
76543210 01100XXX
XXXXXXXX 10100XXX
Selects the transmit mode. Writes the transmit data. Starts reception/transmission.
INTSBI interrupt
Reg. SBIDBR
SBIODBR XXXXXXXX
Reads the received data. Writes the transmit data.
TMP19A64(rev1.1)-14-30
TMP19A64C1D
15. Analog/Digital Converter
A 10-bit, sequential-conversion analog/digital converter (A/D converter) is built into the TMP19A64. This A/D converter is equipped with 24 analog input channels. Fig. 15.1 shows the block diagram of this A/D converter. These 24 analog input channels (pins AN0 through AN23) are also used as input ports. (Note) If it is necessary to reduce a power current by operating the TMP19A64 in IDLE, SLEEP, SLOW or STOP mode and if either case shown below is applicable, you must first stop the A/D converter and then execute the instruction to put the TMP19A64 into standby mode: 1) The TMP19A64 must be put into IDLE mode when ADMOD1 is "0." 2) The TMP19A64 must be put into SLEEP, SLOW or STOP mode.
Internal data bus
Internal data bus
Internal data bus
ADS ADMOD2 ADMOD3 ADMOD4 HPADCE ADSCN end busy scan Channel select control circuit interrupt Interval Normal A/D conversion control circuit start Busy Top-priority AD conversion control TB0 TB9
Top-priority AD conversion completion interrupt Interrupt request INTAD
ADMOD1
ADMOD0
End AD monitor function control
AD monitor function interrupt
repeat
AD start control
AIN23(P97)
Multiplexer
AN15(P87)
Comparator AN0(P70) AD conversion result register ADREGSP
VREFH VREFL
VREF D/A converter
Fig. 15.1 A/D Converter Block Diagram
TMP19A64(rev1.1)-15-1
Comparator
AN7(P77)
-
Comparison register
Sample hold
+
A/D conversion result register ADREG08L-7FL ADREG08H-7FH
TMP19A64C1D
15.1 Control Register
The A/D converter is controlled by A/D mode control registers (ADMOD0, ADMOD1, ADMOD2, ADMOD3 and ADMOD4). Results of A/D conversion are stored in 16 upper and lower A/D conversion result registers ADREG08H/L through ADREG7FH/L. Results of High-priority conversion are stored in ADREGSPH/L. Fig. 15.1.1 shows the registers related to the A/D converter.
A/D Mode Control Register 0 7
ADMOD0 (0xFFFF_F314) bit Symbol Read/Write After reset 0
Normal A/D conversion completion flag
6
ADBFN R 0
Normal A/D conversion BUSY flag
5
R 0
"0" is read.
4
ITM1 0
Specify interrupt in fixed channel repeat conversion mode
3
ITM0 0
Specify interrupt in fixed channel repeat conversion mode
2
REPEAT R/W 0
Specify repeat mode 0: Single conversion mode 1: Repeat conversion mode
1
SCAN 0
Specify scan mode 0: Fixed channel mode 1: Channel scan mode
0
ADS 0
Start A/D conversion 0: Don' care t 1: Start conversion "0" is always read.
EOCFN
Function
0: Conversion 0: Before or stop during 1: During conversion conversion 1: Completion
Specify A/D conversion interrupt in fixed channel repeat conversion mode Fixed channel repeat conversion mode = "0," = "1" 00 Generate interrupt once every single conversion 01 Generate interrupt once every 4 conversions 10 Generate interrupt once every 8 conversions 11 Setting prohibited
Fig. 15.1.1 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-2
TMP19A64C1D
A/D Mode Control Register 1 7
ADMOD1 (0xFFFF_F315) bit Symbol Read/Write After reset Function 0
VREF application control 0: OFF 1: ON
6
I2AD 0
IDLE 0: Stop 1: Activate
5
ADSCN 0
Specify operation mode for channel scanning 0: 4ch scan 1: 8ch scan
4
ADCH4 R/W 0
3
ADCH3 0
2
ADCH2 0
Select analog input channel
1
ADCH1 0
0
ADCH0 0
VREFON
Select analog input channel 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 10001 10010 10011 10100 10101 10110 10111 AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 AN12 AN13 AN14 AN15 AN16 AN17 AN18 AN19 AN20 AN21 AN22 AN23 AN0 AN0 to AN1 AN0 to AN2 AN0 to AN3 AN4 AN4 to AN5 AN4 to AN6 AN4 to AN7 AN8 AN8 to AN9 AN8 to AN10 AN8 to AN11 AN12 AN12 to AN13 AN12 to AN14 AN12 to AN15 AN16 AN16 to AN17 AN16 to AN18 AN16 to AN19 AN20 AN20 to AN21 AN20 to AN22 AN20 to AN23 0 Fixed channel 1 4 channel scan (ADSCN=0) AN0 AN0 to AN1 AN0 to AN2 AN0 to AN3 AN0 to AN4 AN0 to AN5 AN0 to AN6 AN0 to AN7 AN8 AN8 to AN9 AN8 to AN10 AN8 to AN11 AN8 to AN12 AN8 to AN13 AN8 to AN14 AN8 to AN15 AN16 AN16 to AN17 AN16 to AN18 AN16 to AN19 AN16 to AN20 AN16 to AN21 AN16 to AN22 AN16 to AN23 1 8 channel scan (ADSCN=1)
(Note 1) Before starting AD conversion, write "1" to the bit, wait for 3 s during which time the internal reference voltage should stabilize, and then write "1" to the ADMOD0 bit. (Note 2) To go into standby mode upon completion of AD conversion, set to "0." Fig. 15.1.2 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-3
TMP19A64C1D
A/D Mode Control Register 2 7
ADMOD2 (0xFFFF_F316) bit Symbol Read/Write After reset Function 0
Top-priority AD conversion completion flag 0: Before or during conversion 1: Upon completion
6
ADBFHP
5
HPADCE
4
3
R/W
2
1
0
EOCFHP
HPADCH4 HPADCH3 HPADCH2 HPADCH1 HPADCH0
R 0
Top-priority AD conversion BUSY flag 0: During conversion halts 1: During conversion
0
Activate top-priority AD conversion 0:Don't care 1: Start conversion "0" is always read.
0
0
0
0
0
Select analog input channel when activating top-priority AD conversion
00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 10001 10010 10011 10100 10101 10110 10111
Analog input channel when executing top-priority AD conversion AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 AN12 AN13 AN14 AN15 AN16 AN17 AN18 AN19 AN20 AN21 AN22 AN23
Fig. 15.1.3 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-4
TMP19A64C1D
A/D Mode Control Register 3 7
ADMOD3 (0xFFFF_F317) bit Symbol Read/Write After reset Function R/W 0
Write "0."
6
R 0
"0" is read.
5
ADOBIC R/W 0
Make AD monitor function interrupt setting 0: Smaller than comparison Regi 1: Larger than comparison Regi
4
REGS3 0
3
REGS2 R/W 0
2
REGS1 0
1
REGS0 0
0
ADOBSV R/W 0
AD monitor function 0: Disable 1: Enable
BIT for selecting the AD conversion result storage Regi that is to be compared with the comparison Regi if the AD monitor function is enabled
0000 0001 0010 0011 0100 0101 0110 0111 1XXX
AD conversion result storage Regi to be compared ADREG08 ADREG19 ADREG2A ADREG3B ADREG4C ADREG5D ADREG6E ADREG7F ADREGSP
A/D Mode Control Register 4 7
ADMOD4 (0xFFFF_F318) bit Symbol Read/Write After reset Function 0
HW source for activating top-priority A/D conversion 0: INTTB90 1: INTTB91
6
HADHTG R/W 0
HW for activating top-priority A/D conversion 0: Disable 1: Enable
5
ADHS 0
HW source for activating normal A/D conversion 0: INTTB00 1: INTTB01
4
ADHTG
3
R
2
1
ADRST1 W 0
0
ADRST0 W 0
HADHS
0
HW for activating normal A/D conversion 0: Disable 1: Enable "0" is read.
0
Overwriting 10 with 01 allows ADC to be software reset. All registers except the ADCLK register are initialized.
(Note 1) If AD conversion is executed with the match triggers and of a 16-bit timer set to "1" by using a source for triggering H/W, A/D conversion can be activated at specified intervals by performing three steps shown below when the timer is idle: Select a source for triggering HW: , Enable H/W activation of AD conversion: , Start the timer. (Note 2) Do not make a High-priority AD conversion setting and a normal AD conversion setting simultaneously. Fig. 15.1.4 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-5
TMP19A64C1D
Lower A/D Conversion Result Register 08 7
ADREG08L (0xFFFF_F300) bit Symbol Read/Write After reset Function ADR01 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR00
5
4
R
3
2
1
OVR0 R
0
ADR0RF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUN flag 0: Not generate 1: Generate
Upper A/D Conversion Result Register 08 7
ADREG08H (0xFFFF_F301) bit Symbol Read/Write After reset Function 0 0 0 0 ADR09
6
ADR08
5
ADR07
4
ADR06 R
3
ADR05 0
2
ADR04 0
1
ADR03 0
0
ADR02 0
Store upper 8 bits of A/D conversion result
Lower A/D Conversion Result Register 19 7
ADREG19L (0xFFFF_F302) bit Symbol Read/Write After reset Function ADR11 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR10
5
4
R
3
2
1
OVR1 R
0
ADR1RF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUNflag 0: Not generate 1: Generate
Upper A/D Conversion Result Register 19 7
ADREG19H (0xFFFF_F303) bit Symbol Read/Write After reset Function 9 Converted channel x value ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 7 0 0 0 0 ADR19
6
ADR18
5
ADR17
4
ADR16 R
3
ADR15 0
2
ADR14 0
1
ADR13 0
0
ADR12 0
Store upper 8 bits of A/D conversion result 6 5 4 3 2 1 0
* * * *
Values read from bits 5 through 2 of registers ADREG08L and ADREG19L are always "1." Bit 0 of registers ADREG08L and ADREG19L is the A/D conversion result storage flag . This bit is set to "1" after an A/D converted value is stored. A read of a lower register (ADREGxL) clears this bit to "0." Bit 1 of registers ADREG08L and ADREG19L is the over RUN flag . This bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (ADREGxH and ADREGxL) are read. A read of a flag will clear this bit to "0." When reading conversion result storage registers, first read upper registers and then lower registers.
Fig. 15.1.5 Registers related to the A/D Converter TMP19A64(rev1.1)-15-6
TMP19A64C1D
Lower A/D Conversion Result Register 2A 7
ADREG2AL (0xFFFF_F304) bit Symbol Read/Write After reset Function ADR21 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR20
5
4
R
3
2
1
OVR2 R
0
ADR2RF R 0
A/D conversion result storage flag
1
1
0
Over RUN flag 0: Not generate 1: Generate
1: Presence of conversion result
Upper A/D Conversion Result Register 2A 7
ADREG2AH (0xFFFF_F305) bit Symbol Read/Write After reset Function 0 0 0 0 ADR29
6
ADR28
5
ADR27
4
ADR26 R
3
ADR25 0
2
ADR24 0
1
ADR23 0
0
ADR22 0
Store upper 8 bits of A/D conversion result
Lower A/D Conversion Result Register 3B 7
ADREG3BL (0xFFFF_F306) bit Symbol Read/Write After reset Function ADR31 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR30
5
4
R
3
2
1
OVR3 R
0
ADR3RF R 0
A/D conversion result storage flag
1
1
0
Over RUN flag 0: Not generate 1: Generate
1: Presence of conversion result
Upper A/D Conversion Result Register 3B 7
ADREG3BH (0xFFFF_F307) Read/Write After reset Function 9 Converted channel x value ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 7 bit Symbol ADR39 0
6
ADR38 0
5
ADR37 0
4
ADR36 R 0
3
ADR35 0
2
ADR34 0
1
ADR33 0
0
ADR32 0
Store upper 8 bits of A/D conversion result 6 5 4 3 2 1 0
* * * *
Values read from bits 5 through 2 of registers ADREG2AL and ADREG3BL are always "1." Bit 0 of registers ADREG2AL and ADREG3BL is the A/D conversion result storage flag . This bit is set to "1" after an A/D converted value is stored. A read of a lower register (ADREGxL) clears this bit to "0." Bit 1 of registers ADREG2AL and ADREG3BL is the over RUN flag . This bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (ADREGxH and ADREGxL) are read. A read of a flag will clear this bit to "0." When reading conversion result storage registers, first read upper registers and then lower registers.
Fig. 15.1.6 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-7
TMP19A64C1D
Lower A/D Conversion Result Register 4C 7
ADREG4CL (0xFFFF_F308) bit Symbol Read/Write After reset Function ADR41 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR40
5
4
R
3
2
1
OVR4 R
0
ADR4RF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUN flag 0: Not generate 1: Generate
Upper A/D Conversion Result Register 4C 7
ADREG4CH (0xFFFF_F309) bit Symbol Read/Write After reset Function 0 0 0 0 ADR49
6
ADR48
5
ADR47
4
ADR46 R
3
ADR45 0
2
ADR44 0
1
ADR43 0
0
ADR42 0
Store upper 8 bits of A/D conversion result
Lower A/D Conversion Result Register 5D 7
ADREG5DL (0xFFFF_F30A) bit Symbol Read/Write After reset Function 0 ADR51 R 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR50
5
4
R
3
2
1
OVR5 R
0
ADR5RF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUN flag 0: Not generate 1: Generate
Upper A/D Conversion Result Register 5D 7
ADREG5DH (0xFFFF_F30B) bit Symbol Read/Write After reset Function 9 Converted channel x value ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 7 0 0 0 0 ADR59
6
ADR58
5
ADR57
4
ADR56 R
3
ADR55 0
2
ADR54 0
1
ADR53 0
0
ADR52 0
Store upper 8 bits of A/D conversion result 6 5 4 3 2 1 0
* * * *
Values read from bits 5 through 2 of registers ADREG4CL and ADREG5DL are always "1." Bit 0 of registers ADREG4CL and ADREG5DL is the A/D conversion result storage flag . This bit is set to "1" after an A/D converted value is stored. A read of a lower register (ADREGxL) clears this bit to "0." Bit 1 of registers ADREG4CL and ADREG5DL is the over RUN flag . This bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (ADREGxH and ADREGxL) are read. A read of a flag will clear this bit to "0." When reading conversion result storage registers, first read upper registers and then lower registers.
Fig. 15.1.7 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-8
TMP19A64C1D
Lower A/D Conversion Result Register 6E 7
ADREG6EL (0xFFFF_F30C) bit Symbol Read/Write After reset ADR61 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR60
5
4
R
3
2
1
OVR6 R
0
ADR6RF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUN flag 0: Not generate 1: Generate
Function
Upper A/D Conversion Result Register 6E 7
ADREG6EH (0xFFFF_F30D) bit Symbol Read/Write After reset Function 0 0 0 0 ADR69
6
ADR68
5
ADR67
4
ADR66 R
3
ADR65 0
2
ADR64 0
1
ADR63 0
0
ADR62 0
Store upper 8 bits of A/D conversion result
Lower A/D Conversion Result Register 7F 7
ADREG7FL (0xFFFF_F30E) bit Symbol Read/Write After reset ADR71 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADR70
5
4
R
3
2
1
OVR7 R
0
ADR7RF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUNflag 0: Not generate 1: Generate
Function
Upper A/D Conversion Result Register 7F 7
ADREG7FH (0xFFFF_F30F) bit Symbol Read/Write After reset Function 9 Converted channel x value ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 7 0 0 0 0 ADR79
6
ADR78
5
ADR77
4
ADR76 R
3
ADR75 0
2
ADR74 0
1
ADR73 0
0
ADR72 0
Store upper 8 bits of A/D conversion result 6 5 4 3 2 1 0
* * * *
Values read from bits 5 through 2 of registers ADREG6EL and ADREG7FL are always "1." Bit 0 of registers ADREG6EL and ADREG7FL is the A/D conversion result storage flag . This bit is set to "1" after an A/D converted value is stored. A read of a lower register (ADREGxL) clears this bit to "0." Bit 1 of registers ADREG6EL and ADREG7FL is the over RUN flag . This bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (ADREGxH and ADREGxL) are read. A read of a flag will clear this bit to "0." When reading conversion result storage registers, first read upper registers and then lower registers.
Fig. 15.1.8 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-9
TMP19A64C1D
Lower A/D Conversion Result Register SP 7
ADREGSPL (0xFFFF_F310) bit Symbol Read/Write After reset ADRSP1 R 0 0 Store lower 2 bits of A/D conversion result 1 "1" is read. 1
6
ADRSP0
5
4
R
3
2
1
OVRSP R
0
ADRSPRF R 0
A/D conversion result storage flag 1: Presence of conversion result
1
1
0
Over RUN flag 0: Not generate 1: Generate
Function
Upper A/D Conversion Result Register SP 7
ADREGSPH (0xFFFF_F311) bit Symbol Read/Write After reset Function 0 0 0 0 ADRSP9
6
ADRSP8
5
ADRSP7
4
ADRSP6 R
3
ADRSP5 0
2
ADRSP4 0
1
ADRSP3 0
0
ADRSP2 0
Store upper 8 bits of A/D conversion result
9 Converted channel x value
8
7
6
5
4
3
2
1
0
ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2
ADREGxL 1 0
* * * *
Values read from bits 5 through 2 of register ADREGSPL are always "1." Bit 0 of register ADREGSPL is the A/D conversion result storage flag . This bit is set to "1" after an A/D converted value is stored. A read of a lower register (ADREGxL) clears this bit to "0." Bit 1 of register ADREGSPL is the over RUN flag . This bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (ADREGxH and ADREGxL) are read. A read of a flag will clear this bit to "0." When reading conversion result storage registers, first read upper registers and then lower registers.
Fig. 15.1.9 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-10
TMP19A64C1D
Lower A/D Conversion Result Comparison Register 7
ADCOMREG (0xFFFF_F312) bit Symbol Read/Write After reset Function ADR21 R/W 0 0 Store lower 2 bits of A/D conversion result comparison 0 "0" is read. 0 0
6
ADR20
5
4
3
R
2
1
0
0
0
0
Upper A/D Conversion Result Comparison Register 7
ADCOMREGH (0xFFFF_F313) bit Symbol Read/Write After reset Function 0 0 0 0 ADR29
6
ADR28
5
ADR27
4
ADR26 R/W
3
ADR25 0
2
ADR24 0
1
ADR23 0
0
ADR22 0
Store upper 8 bits of A/D conversion result comparison
(Note)
To set or change a value in this register, the AD monitor function must be disabled (ADMOD3="0"). Fig. 15.1.10 Registers related to the A/D Converter
TMP19A64(rev1.1)-15-11
TMP19A64C1D
15.2 Conversion Clock
The conversion time is calculated based on the 41 conversion clock and the sample hold time.
A/D Conversion Clock Setting Register 7
ADCLK (0xFFFF_F31C) bit Symbol Read/Write After reset R/W 0
Write "0."
6
TSH2 R/W 0
5
TSH1 R/W 0
4
TSH0 R/W 0
3
R 0
2
ADCLK2 R/W 0
000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 111:reserved
1
ADCLK1 R/W 1
0
ADCLK0 R/W 1
Function
Select the A/D sample hold time 000:12 conversion clock 001:12x2 conversion clock 010: 12x3 conversion clock 011: 12x4 conversion clock 100: 12x16 conversion clock 101: 12x64 conversion clock 110: 12x256 conversion clock 111: 12x1024 conversion clock
Select the A/D prescaler output
ADCLK2:0 fc /1 /2 /4 /8 /16
ADCLK
Conversion clock
6.75 MHz
Sample hold time Conversion clk*12*1 (1.78 us) Conversion clk*12*2 (3.56 us) Conversion clk*12*3 (5.33 us) Conversion clk*12*4 (7.11 us) Conversion clk*12*16 (28.4 us) Conversion clk*12*64 (114 us) Conversion clk*12*256 (455 us) Conversion clk*12*1024 (1.82 ms)
tconv. 7.85 us 9.63 us 11.4 us 13.2 us 34.5 us 120 us 461 us 1.83 ms
TMP19A64(rev1.1)-15-12
TMP19A64C1D
15.3 Description of Operations
15.3.1 Analog Reference Voltage
The "H" level of the analog reference voltage shall be applied to the VREFH pin, and the "L" level shall be applied to the VREFL pin. By writing "0" to the ADMOD1 bit, a switched-on state of VREFHVREFL can be turned into a switched-off state. To start AD conversion, make sure that you first write "1" to the bit, wait for 3 s during which time the internal reference voltage should stabilize, and then write "1" to the ADMOD0 bit.
15.3.2
Selecting the Analog Input Channel
How the analog input channel is selected is different depending on A/D converter operation mode used. (1) Normal AD conversion mode * If the analog input channel is used in a fixed state (ADMOD0="0"): One channel is selected from analog input pins AIN0 through AIN23 by setting ADMOD1 to an appropriate setting. * If the analog input channel is used in a scan state (ADMOD0="1"): One scan mode is selected from 24 scan modes by setting ADMOD1 and ADSCN to appropriate settings. (2) High-priority AD conversion mode One channel is selected from analog input pins AIN0 through AIN23 by setting ADMOD2 to an appropriate setting. After a reset, ADMOD0 is initialized to "0" and ADMOD1 is initialized to "0000." This initialization works as a trigger to select a fixed channel input through the AN0 pin. The pins that are not used as analog input channels can be used as ordinary input ports. If High-priority AD conversion is activated during normal AD conversion, normal AD conversion is discontinued, High-priority AD conversion is executed and completed, and then normal AD conversion is resumed. Example: A case in which repeat-scan conversion is ongoing at channels AIN0 through AIN3 with ADMOD0 set to "11" and ADMOD1 set to 00011, and High-priority AD conversion has been activated at AIN15 with ADMOD2=01111:
Top-priority AD has been activated Conversion Ch
Ch0
Ch1
Ch2
Ch15
Ch2
Ch3
Ch0
TMP19A64(rev1.1)-15-13
TMP19A64C1D
15.3.3
Starting A/D Conversion
Two types of A/D conversion are supported: normal AD conversion and High-priority AD conversion. Normal AD conversion is software activated by setting ADMOD0 to "1." High-priority AD conversion is software activated by setting ADMOD2 to "1." 4 operation modes are made available to normal AD conversion. In performing normal AD conversion, one of these operation modes must be selected by setting ADMOD0<2:1> to an appropriate setting. For High-priority AD conversion, only one operation mode can be used: fixed channel single conversion mode. Normal AD conversion can be activated using the HW activation source selected by ADMOD4, and High-priority AD conversion can be activated using the HW activation source selected by ADMOD4. If this bit is "0," normal AD conversion is activated in response to INTTB00 generated by the 16-bit timer 0, and Highpriority AD conversion is activated in response to INTTB90 generated by the 16-bit timer 9. If this bit is "1," normal AD conversion is activated in response to INTTB01 generated by the 16-bit timer 0, and Highpriority AD conversion is activated in response to INTTB91 generated by the 16-bit timer 9. Software activation is still valid even after H/W activation has been authorized. When normal A/D conversion starts, the A/D conversion Busy flag (ADMOD0) showing that A/D conversion is under way is set to "1." When High-priority A/D conversion starts, the A/D conversion Busy flag (ADMOD2) showing that A/D conversion is under way is set to "1." If normal A/D conversion is interrupted by High-priority A/D conversion, the value of the Busy flag for normal A/D conversion before the start of High-priority A/D conversion is retained. The value of the conversion completion flag EOCFN for normal A/D conversion before the start of High-priority A/D conversion can also be retained. (Note) Normal A/D conversion must not be activated when High-priority A/D conversion is under way. If activated when High-priority A/D conversion is under way, the High-priority A/D conversion completion flag cannot be set, and the flag for previous normal A/D conversion cannot be cleared.
To reactivate normal A/D conversion, a software reset (ADMOD4) must be performed before starting A/D conversion. The HW activation method must not be used to reactivate normal A/D conversion. If ADMOD2 is set to "1" during normal A/D conversion, ongoing A/D conversion is discontinued and High-priority A/D conversion starts; specifically, A/D conversion (fixed channel single conversion) is executed for a channel designated by ADMOD2<3:0>. After the result of this High-priority A/D conversion is stored in the storage register ADREGSP, normal A/D conversion is resumed. If HW activation of High-priority A/D conversion is authorized during normal A/D conversion, ongoing A/D conversion is discontinued when requirements for activation using a resource are met, and Highpriority A/D conversion (fixed channel single conversion) starts for a channel designated by ADMOD2<3:0>. After the result of this High-priority A/D conversion is stored in the storage register ADREGSP, normal A/D conversion is resumed.
TMP19A64(rev1.1)-15-14
TMP19A64C1D
15.3.4
A/D Conversion Modes and A/D Conversion Completion Interrupts
For A/D conversion, the following four operation modes are supported. For normal A/D conversion, an operation mode can be selected by setting ADMOD0<2:1> to an appropriate setting. For High-priority A/D conversion, the fixed channel single conversion mode is automatically selected, irrespective of the ADMOD0<2:1> setting. * * * * Fixed channel single conversion mode Channel scan single conversion mode Fixed channel repeat conversion mode Channel scan repeat conversion mode
(1) Normal A/D conversion An operation mode is selected with ADMOD0. As A/D conversion starts, ADMOD0 is set to "1." When specified A/D conversion is completed, the A/D conversion completion interrupt (INTAD) is generated, and ADMOD0 showing the completion of A/D conversion is set to "1." If ="0," returns to "0" concurrently with the setting of EOCF. If is set to "1," remains at "1" and A/D conversion continues. Fixed channel single conversion mode If ADMOD0 is set to "00," A/D conversion is performed in the fixed channel single conversion mode. In this mode, A/D conversion is performed once for one channel selected. After A/D conversion is completed, ADMOD0 is set to "1," ADMOD0 is cleared to "0," and the interrupt request INTAD is generated. is cleared to "0" upon read. Channel scan single conversion mode If ADMOD0 is set to "01," A/D conversion is performed in the channel scan single conversion mode. In this mode, A/D conversion is performed once for each scan channel selected. After A/D scan conversion is completed, ADMOD0 is set to "1," ADMOD0 is cleared to "0," and the interrupt request INTAD is generated. is cleared to "0" upon read. Fixed channel repeat conversion mode If ADMOD0 is set to "10," A/D conversion is performed in fixed channel repeat conversion mode. In this mode, A/D conversion is performed repeatedly for one channel selected. After A/D conversion is completed, ADMOD is set to "1." ADMOD0 is not cleared to "0." It remains at "1." The timing with which the interrupt request INTAD is generated can be selected by setting ADMOD0 to an appropriate setting. is set with the same timing as this interrupt INTAD is generated. is cleared to "0" upon read. With set to "00," an interrupt request is generated each time one A/D conversion is completed. In this case, the conversion results are always stored in the storage register ADREG08. After the conversion result is stored, EOCF changes to "1." With set to "01," an interrupt request is generated each time four A/D conversion are completed. In this case, the conversion results are sequentially stored in storage registers ADREG08 through ADREG3B. After the conversion results are stored in ADREG3B, is set to "1," and the storage of subsequent conversion results starts from ADREG08. is cleared to "0" upon read. TMP19A64(rev1.1)-15-15
TMP19A64C1D
With set to "10," an interrupt request is generated each time eight A/D conversions are completed. In this case, the conversion results are sequentially stored in storage registers ADREG08 through ADREG7F. After the conversion results are stored in ADREG7F, is set to "1," and the storage of subsequent conversion results starts from ADREG08. is cleared to "0" upon read. Channel scan repeat conversion mode If ADMOD0 is set to "11," A/D conversion is performed in the channel scan repeat conversion mode. In this mode, A/D conversion is performed repeatedly for a scan channel selected. Each time one A/D scan conversion is completed, ADMOD0 is set to "1," and the interrupt request INTAD is generated. ADMOD0 is not cleared to "0." It remains at "1." is cleared to "0" upon read. To stop the A/D conversion operation in the repeat conversion mode (modes described in and above), write "0" to ADMOD0 . When ongoing A/D conversion is completed, the repeat conversion mode terminates, and ADMOD0 is set to "0." (2) High-priority A/D conversion High-priority A/D conversion is performed only in fixed channel single conversion mode. The ADMOD0 setting has no relevance to the High-priority A/D conversion operations or preparations. As activation requirements are met, A/D conversion is performed only once for a channel designated by ADMOD2. After the A/D conversion is completed, the High-priority A/D conversion completion interrupt is generated, ADMOD2 is set to "1," and returns to "0." The EOCFHP Flag is cleared upon read.
TMP19A64(rev1.1)-15-16
TMP19A64C1D
Relationships between A/D Conversion Modes, Interrupt Generation Timings and Flag Operations
Conversion mode Fixed channel single conversion Fixed channel repeat conversion Interrupt generation timing After conversion is completed Each time one conversion is completed Each time four conversions are completed Each time eight conversions are completed After scan conversion is completed Each time one scan conversion is completed ADBF ADMOD0 EOCF setting timing (after the interrupt (see Note) ITM1:0 REPEAT SCAN is generated) After conversion is completed After one conversion is completed After four conversions are completed After eight conversions are completed After scan conversion is completed After one scan conversion is completed 0 1 1 1 1 1 00 01 10 0 1 1 1 1 0 0 0
Channel scan single conversion Channel scan repeat conversion
(Note)
EOCF is cleared upon read. Fig. 15.3.4.1 Relationships between A/D Conversion Modes, Interrupt Generation Timings and Flag Operations
TMP19A64(rev1.1)-15-17
TMP19A64C1D
15.3.5
High-priority Conversion Mode
By interrupting ongoing normal A/D conversion, High-priority A/D conversion can be performed. Highpriority A/D conversion can be software activated by setting ADMOD2 to "1" or it can be activated using the HW resource by setting ADMOD4<7:6> to an appropriate setting. If High-priority A/D conversion has been activated during normal A/D conversion, ongoing normal A/D conversion is interrupted, and single conversion is performed for a channel designated by ADMOD2<3:0>. The result of single conversion is stored in ADREGSP, and the High-priority A/D conversion interrupt is generated. After High-priority A/D conversion is completed, normal A/D conversion is resumed; the status of normal A/D conversion immediately before being interrupted is maintained. High-priority A/D conversion activated while High-priority A/D conversion is under way is ignored. For example, if channel repeat conversion is activated for channels AN0 through AN8 and if is set to "1" during AN3 conversion, AN3 conversion is suspended, and conversion is performed for a channel designated by . After the result of conversion is stored in ADREGSP, channel repeat conversion is resumed, starting from AN3.
15.3.6
A/D Monitor Function
If ADMOD3 is set to "1," the A/D monitor function is enabled. If the value of the conversion result storage register specified by REGS<3:0> becomes larger or smaller ("larger" or "smaller" to be designated by ADOBIC) than the value of a comparison register, the A/D monitor function interrupt is generated. This comparison operation is performed each time a result is stored in a corresponding conversion result storage register, and the interrupt is generated if the conditions are met. Because storage registers assigned to perform the A/D monitor function are usually not read by software, overrun flag is always set and the conversion result storage flag is also set. To use the A/D monitor function, therefore, a flag of a corresponding conversion result storage register must not be used.
15.3.7
A/D Conversion Time
By setting ADCLK to an appropriate setting, one A/D conversion clock can be selected for fc, fc/2, fc/4, fc/8 and fc/16 (AD prescaler outputs). To achieve the guaranteed accuracy, the A/D conversion clock must be 6.75 MHz or less, that is, the A/D conversion time must be 7.85 s or longer.
15.3.8
Storing and Reading A/D Conversion Results
A/D conversion results are stored in upper and lower A/D conversion result registers for normal A/D conversion (ADREG08H/L through ADRG7FH/L). In fixed channel repeat conversion mode, A/D conversion results are sequentially stored in ADREG08H/L through ADREG7FH/L. If is so set as to generate the interrupt each time one A/D conversion is completed, conversion results are stored only in ADREG08H/L. If is so set as to generate the interrupt each time four A/D conversions are completed, conversion results are sequentially stored in ADREG08H/L through ADREG3BH/L. Table 15.3.8.1 shows analog input channels and related A/D conversion result registers.
TMP19A64(rev1.1)-15-18
TMP19A64C1D
Table 15.3.8.1 Analog Input Channels and Related A/D Conversion Result Registers
A/D conversion result register Analog input Conversion modes Fixed channel repeat Fixed channel repeat Fixed channel repeat channel other than shown conversion mode conversion mode conversion mode to the right (every one conversion) (every four conversions) (every eight conversions)
AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 AN8 AN9 AN10 AN11 AN12 AN13 AN14 AN15 AN16 AN17 AN18 AN19 AN20 AN21 AN22 AN23 ADREG08H/L ADREG19H/L ADREG2AH/L ADREG3BH/L ADREG4CH/L ADREG5DH/L ADREG6EH/L ADREG7FH/L ADREG08H/L ADREG19H/L ADREG2AH/L ADREG3BH/L ADREG4CH/L ADREG5DH/L ADREG6EH/L ADREG7FH/L ADREG08H/L ADREG19H/L ADREG2AH/L ADREG3BH/L ADREG4CH/L ADREG5DH/L ADREG6EH/L ADREG7FH/L ADREG08H/L fixed
ADREG08H/L
ADREG08H/L
ADREG3BH/L
ADREG7FH/L
15.3.9
Data Polling
To process A/D conversion results without using interrupts, ADMOD0 must be polled. If this flag is set, conversion results are stored in a specified A/D conversion result register. After confirming that this flag is set, read that conversion result storage register. In reading the register, make sure that you first read upper bits and then lower bits to detect an overrun. If OVRn is "0" and ADRnRF is "1" in lower bits, a correct conversion result has been obtained.
TMP19A64(rev1.1)-15-19
TMP19A64C1D
16. Watchdog Timer (Runaway Detection Timer)
The TMP19A64 has a built-in watchdog timer for detecting runaways. The watchdog timer (WDT) is for detecting malfunctions (runaways) of the CPU caused by noises or other disturbances and remedying them to return the CPU to normal operation. If the timer detects a runaway, it generates a non-maskable interrupt to notify the CPU. By connecting the output of the watchdog timer to a reset pin (inside the chip), it is possible to force the watchdog timer to reset itself.
16.1 Configuration
Fig. 16.1 shows the block diagram of the watchdog timer.
WDMOD
RESET pin
Reset control
Internal reset
Interrupt request INTWDT WDMOD Selector
216/fsys
218/fsys
220/fsys
222/fsys
Q fSYS/2 Binary counter (22 stages) Reset R S
Internal reset Write 4EH Write B1H WDMOD
Watchdog timer control register WDCR
Internal data bus
Fig. 16.1 Block Diagram of the Watchdog Timer
TMP19A64(rev1.1)-16-1
TMP19A64C1D
16.2
Watchdog Timer Interrupt
The watchdog timer consists of the binary counters that are arranged in 22 stages and work using the fSYS/2 system clock as an input clock. The outputs produced by these binary counters are 215, 217, 219 and 221. By selecting one of these outputs with WDMOD , a watchdog timer interrupt can be generated when an overflow occurs, as shown in Fig. 16.2.1. Because the watchdog timer interrupt is a non-maskable interrupt factor, NMIFLG at the INTC performs a task of identifying it.
WDT counter
n
Overflow
0
WDT interrupt Write of a clear code WDT clear (software)
Fig. 16.2.1 Normal Mode
When an overflow occurs, resetting the chip itself is an option to choose. If the chip is reset, a reset is effected for a 32-state time, as shown in Fig. 16.2.2. If this reset is effected, the clock fSYS that the clock gear generates by dividing the clock fC of the high-speed oscillator by 8 is used as an input clock fSYS/2.
Overflow WDT counter n
WDT interrupt
Internal reset
32-state (9.48 s @ fC = 54 MHz, fsys = 6.75 MHz, fsys/2 = 3.375 MHz)
Fig. 16.2.2 Reset Mode (Note 1) When the watchdog timer functions to effect a reset, sampling of the status of the PLLOFF pin still continues. Therefore, use the PLLOFF pin at the level fixed to "H." (Note 2) If the watchdog timer is operated when the high-frequency oscillator is idle, the system reset operation initiated by the watchdog timer becomes erratic due to the unstable oscillation of the high-frequency oscillator. Therefore, do not operate the watchdog timer when the high-frequency oscillator is idle.
TMP19A64(rev1.1)-16-2
TMP19A64C1D
16.3 Control Registers
The watchdog timer (WDT) is controlled by two control registers WDMOD and WDCR.
16.3.1
Watchdog Timer Mode Register (WDMOD)
Specifying the detection time of the watchdog timer This is a 2-bit register for specifying the watchdog timer interrupt time for runaway detection. When a reset is effected, this register is initialized to WDMOD = "00." Fig. 16.3.1.1 shows the detection time of the watchdog timer. Enabling/disabling the watchdog timer When reset, WDMOD is initialized to "1" and the watchdog timer is enabled. To disable the watchdog timer, this bit must be set to "0" and, at the same time, the disable code (B1H) must be written to the WDCR register. This dual setting is intended to minimize the probability that the watchdog timer may inadvertently be disabled if a runaway occurs. To change the status of the watchdog timer from "disable" to "enable," set the bit to "1." Watchdog timer out reset connection This register is used to make a non-maskable interrupt (INTWDT) setting associated with the detection of a runaway or to make a connection setting after an internal reset. After a reset, WDMOD is initialized to "0," and a non-maskable interrupt setting is established. For information on the status of non-maskable interrupts, refer to the NMIFLG register which is described in Chapter 6 "Interrupts."
TMP19A64(rev1.1)-16-3
TMP19A64C1D
7
bit Symbol WDMOD (0xFFFF_F090) Read/Write After reset Function WDTE R/W 1 WDT control 0: Disable 1: Enable
6
WDTP1 R/W 0
5
WDTP0
4
R
3
R 0
2
I2WDT R/W 0 IDLE 0: Stop 1: Start
1
RESCR 0 Selects internal RESET
0: Connects NMI 1: Connects internal reset
0
R/W 0 Write "0."
0
0
Selects WDT detection time 00: 2 /fSYS 01: 2 /fSYS 10: 2 /fSYS 11: 2 /fSYS
22 20 18 16
Watchdog timer out control 0 NMI interrupt 1 Connects WDT out to internal reset
Detection time of watchdog timer
SYSCR1 clock gear value 000 (fc) 100 (fc/2) 110 (fc/4) 111 (fc/8)
@ fc = 54 MHz
Detection Time of Watchdog Timer WDMOD 00 1.2 ms 2.4 ms 4.9 ms 9.7 ms 01 4.9 ms 9.7 ms 19.4 ms 38.8 ms 10 19.4 ms 38.8 ms 77.7 ms 155.3 ms 11 77.7 ms 155.3 ms 310.7 ms 621.4 ms
Enable/disable control of the watchdog timer
0 1 Disable Enable
Fig. 16.3.1.1 Watchdog Timer Mode Register
TMP19A64(rev1.1)-16-4
TMP19A64C1D
16.3.2
Watchdog Timer Control Register (WDCR)
This is a register for disabling the watchdog timer function and controlling the clearing function of the binary counter. * Disabling control By writing the disable code (B1H) to this WDCR register after setting WDMOD to "0," the watchdog timer can be disabled.
WDMOD WDCR 0------- 10110001
Clears WDTE to "0." Writes the disable code (B1H).
*
Enabling control Set WDMOD to "1."
*
Watchdog timer clearing control Writing the clear code (4EH) to the WDCR register clears the binary counter and allows it to resume counting.
WDCR 01001110
Writes the clear code (4EH).
(Note)
Writing the disable code (BIH) clears the binary counter.
7
bit Symbol WDCR (0xFFFF_F091) Read/Write After reset Function
6
5
4
W
3
2
1
0
B1H : WDT disable code 4EH : WDT clear code Others: Disabled This is a write-only register. If each bit is read, "0" is returned.
B1H 4EH Others
Disable & clear of WDT Disable code Clear code
Fig. 16.3.2.1 Watchdog Timer Control Register
TMP19A64(rev1.1)-16-5
TMP19A64C1D
16.4 Operation Description
The watchdog timer generates the INTWD interrupt after a lapse of the detection time specified by the WDMOD register. Before generating the INTWD interrupt, the binary counter for the watchdog timer must be cleared to "0" using software (instruction). If the CPU malfunctions (runs away) due to noise or other disturbances and cannot execute the instruction to clear the binary counter, the binary counter overflows and the INTWD interrupt is generated. The CPU is able to recognize the occurrence of a malfunction (runaway) by identifying the INTWD interrupt and to restore the faulty condition to normal by using a malfunction (runaway) countermeasure program. Additionally, it is possible to resolve the problem of a malfunction (runaway) of the CPU by connecting the watchdog timer out pin to reset pins of peripheral devices. The watchdog timer begins operation immediately after a reset is cleared. In STOP mode, the watchdog timer is reset and in an idle state. When the bus is open ( BUSAK = "L"), it continues counting. In IDLE mode, its operation depends on the WDMOD setting. Before putting it in IDLE mode, WDMOD must be set to an appropriate setting, as required. Examples: To clear the binary counter
WDCR 76543210 01001110
Writes the clear code (4EH)
To set the detection time of the watchdog timer to 218/fSYS
WDMOD 76543210 101-----
To disable the watchdog timer
WDMOD WDCR 76543210 0------- 10110001
Clears WDTE to "0" Writes the disable code (B1H)
Note:
If the watchdog timer is operated when the high-frequency oscillator is idle, the system reset operation initiated by the watchdog timer becomes erratic due to the unstable oscillation of the high-frequency oscillator. Therefore, do not operate the watchdog timer when the high-frequency oscillator is idle.
TMP19A64(rev1.1)-16-6
TMP19A64C1D
17. Backup Module (Clock Timer, Backup RAM)
17.1 Features
The TMP19A64 has a backup module (backup mode) with a built-in timer dedicated to clock operations and a built-in backup RAM. Using this backup module, the TMP19A64 can operate in low-power-consumption operation modes. Specifically, power to all blocks (CPU, peripheral I/Os, etc.) except the backup module is disconnected; because only the backup module is supplied with power, it is possible to reduce the amount of consumption current greatly.
17.2 Block Diagram
Fig. 17.2 shows the block diagram of the backup module.
TX19A64
Other blocks DVCC RESET
CPU
Backup I/F
Back-up module BRESET BUPMD BVCC Low-speed oscillation circuit
XT1
512byte B-up RAM
Clock timer
INTRTC
Fig. 17.2 Block Diagram of the Backup Module
TMP19A64(rev1.1)-17-1
TMP19A64C1D
Precautions for the use of the backup module: Low-speed oscillation starts when the backup module (BVCC) is powered on. The software start or stop of low-speed oscillation is not permitted. To put the TMP19A64 in backup mode or normal operation mode, necessary settings must be made. When the backup module is operating in SLOW mode, access to the backup RAM is prohibited. The functions that can be initialized with BRESET are as follows: Clock timer: Initialize Backup RAM: Undefined Backup module reset flag: Initialize Registers in the backup module (RTCFLG, RTCCR, RTCREG) Low-speed oscillator: Continued oscillation If the backup module and the low-frequency oscillator are not used, the following settings must be made: Power supply level: BVCC, BRESET GND level: XT1, BUPMD
17.3 Backup Mode
A backup mode is provided as a system operation mode. In backup mode, the power to all blocks except the backup module is disconnected so that the TMP19A64 can operate with low power consumption. Fig. 17.3 is the state transition diagram showing a transition to the backup mode.
DVCC on RESET Backup mode
All blocks other than BVCC are shut down. SLOW/SLEEP mode
NORMAL mode
All blocks are powered on during the fullpower operation.
During the low-speed operation, only the backup power supply is powered on, only the clock timer is operating, and the RAM data is retained.
Some blocks are powered on during the low-speed operation.
BUPMD input
Fig. 17.3 Block Diagram of the Backup Module
TMP19A64(rev1.1)-17-2
TMP19A64C1D
17.4 Backup Mode Operation
17.4.1 Transition to Backup Mode
To put the TMP19A64 into backup mode, first set the backup mode trigger pin (BUPMD) to "0," and then cut off the main power supply (DVCC3, DVCC15). When performing these two steps, caution must be used because there is the possibility that data is being written to the backup RAM. Therefore, steps must be performed according to the sequence shown below. Additionally, to recover from backup mode, the power must be turned on and signals must be processed according to the sequence shown below.
DVCC15 DVCC3 (internal power supply) RESET
BUPMD Backup mode period
To recover from backup mode, steps
,
and
must be performed in this order.
If data is being written to the backup RAM in the backup module, the period (4) must be more than 50 clocks (1 sec (@54 MHz)) in order to guarantee the integrity of data.
TMP19A64(rev1.1)-17-3
TMP19A64C1D
17.4.2
Power-on (Recovery from Backup Mode)
Example: If the DVCC15 power and the BVCC power are activated with different timings
DVCC3
(internal power supply)
DVCC15
(internal power supply)
RESET
(main reset)
BVCC
(power supply for the backup module)
BRESET
(backup module reset)
BUPMD
(backup mode signal)
t1
t2
t3
t1: t2: t3:
As BVCC stabilizes, BRESET is maintained at "L" for more than 2 ms*. (* This time length differs depending on the characteristics of the oscillator.) BUPMD is set to "H" after a lapse of the warming-up time for the high-speed oscillator. RESET is cleared after the level of BUPMD changes to "H." (The backup module is initialized according to the initial routine.)
Even if the instruction to move to STOP mode has been executed, low-speed oscillation continues as long as BVCC (power supply for the backup module) is supplying power. Therefore, after the instruction to move to STOP mode is executed, BVCC must be shut down. To recover from STOP mode, first start BVCC, BRESET and BUPMD in the same sequence as they are powered on, and then clear STOP mode.
TMP19A64(rev1.1)-17-4
TMP19A64C1D
17.5 Backup RAM
17.5.1 Features
The backup module has a built-in backup RAM (512 bytes) to be used when the TMP19A64 operates in low-power-consumption operation mode. This RAM holds data when the TMP19A64 is operating in backup mode. The data held in the RAM remains intact even if a reset is executed. Backup RAM area (512 bytes): 0xFFFF_E800 through 0xFFFF_E9FF Data in the backup RAM area is retained when the TMP19A64 is operating in backup mode. The data held in the backup RAM area is retained even if a reset (/RESET) is executed. The /BRESET pin is used to initialize (undefined value) the backup RAM area. Note: Concerning the access to the backup RAM area for a read or write, a time length equal to 10 system clocks is required to process one such access.
17.6 Clock Timer
17.6.1 Features
The backup module has a built-in clock timer to be used when the TMP19A64 operates in low-power consumption operation mode. This clock timer using 32.768 kHz as a low clock frequency can generate interrupts at time intervals of 0.125s, 0.250s, 0.500s and 1.000s so that the TMP19A64 is able to use the clock function when operating in low-power-consumption operation modes. This clock timer can be operated in all operation modes of low-frequency oscillation. The interrupt generated by the clock timer allows the TMP19A64 to recover from standby mode (except STOP mode). To use the clock timer interrupt (INTRTC), the IMCGD register in the CG must be set to an appropriate setting. Fig. 17.6.1 shows the block diagram of the clock timer.
BRESET
RTCFLG RTCCR Selector 32-bit cumulative register RTCREG CLEAR
Interrupt request INTRTC
RUN& CLEAR fs (32.768 kHz)
2
12
2
13
2
14
2
15
15-stage binary counter
Fig. 17.6.1 Block Diagram of the Clock Timer
TMP19A64(rev1.1)-17-5
TMP19A64C1D
17.6.2
Registers
The clock timer is controlled by the clock timer control register (RTCCR), backup mode flag register (RTCFLG), and clock timer count cumulative register (RTCREG). These registers are the 32-bit registers that can be initialized by /BRESET. Fig. 17.6.2.1 shows the clock timer control register.
(fs = 32.768 kHz) 31 Bit Symbol RTCCR (0xFFFF_E704) Read/Write After BRESET Function Bit Symbol Read/Write After BRESET Function Bit Symbol Read/Write After BRESET Function Bit Symbol Read/Write After BRESET Function R/W 0 Write "0." R/W 0 Write "0." R 0 0 0 7 0 6 0 5 0 4 R 0 15 0 14 0 13 0 12 R 0 3 RTCRCLR W 0
Clear cumulative register 0: Clear 1: Don't Care
30
29
28 R
27
26
25
24
0 23
0 22
0 21
0 20
0 19
0 18
0 17
0 16
0 11
0 10
0 9
0 8
0 2 RTCSEL1
0 1 RTCSEL0
0 0 RTCRUN R/W 0
Binary counter 0: Stop & clear 1: Count
R/W 0 0 Interrupt generation cycle 15 00: 2 /fs (1.000 s) 14 01: 2 /fs (0.500 s) 13 10: 2 /fs (0.250 s) 12 11: 2 /fs (0.125 s)
Fig. 17.6.2.1 Clock Timer Control Register (Note) (Note) (Note) (Note) To access this register, 32-bit access is required. Values read from the registers are undefined until /BRESET is activated. Values read from RTCCR are always "1." Before changing the RTCCR setting, make sure that RTCCR is "0" and that the RTC interrupt is disabled.
TMP19A64(rev1.1)-17-6
TMP19A64C1D
The backup mode flag register RTCFLG is a 32-bit register that has the bit for monitoring the activation of /BRESET and can be initialized by /BRESET. By writing "1" to the bit after /BRESET when starting the backup module, this register can be used as a /BRESET activation monitor. Fig. 17.6.2.2 shows the clock timer control register.
31 Bit Symbol RTCFLG Read/Write (0xFFFF_E700) After BRESET Function Bit Symbol Read/Write After BRESET Function Bit Symbol Read/Write After BRESET Function Bit Symbol Read/Write After BRESET 0 0 15
30
29
28 R
27
26
25
24
0 23
0 22
0 21
0 See Note 20 R
0 19
0 18
0 17
0 16
0 14
0 13
0 See Note 12 R
0 11
0 10
0 9
0 8
0 7
0 6
0 5
0 See Note 4 R 0 See Note
0
3
0 2
0 1
0
0
BUPFLG 0 0 0 0 0 R/W 0 BRESET Monitor flag
0: After BRESET
Function
See Notes
Fig. 17.6.2.2 Backup Mode Flag Register (Note) (Note) (Note) (Note) Values read from this register are undefined until /BRESET is activated. For this register, 32-bit access is required. Only "1" can be written to the bit. After /BRESET, the bit changes to "0." Therefore, this register can be used as a /BRESET activation monitor by writing "1" after /BRESET when starting the backup module.
TMP19A64(rev1.1)-17-7
TMP19A64C1D
The clock timer is provided with a clock count cumulative register (RTCREG) for counting the number of times interrupts are generated. If 1.0s is selected as an interrupt generation cycle, a maximum of 4294967296 seconds can be retained (136 years, 70 days, 6 hours, 28 minutes, and 16 seconds). Clock Count Cumulative Register
31 Bit Symbol RTCREG Read/Write (0xFFFF_E708) After reset Function Bit Symbol Read/Write After reset Function Bit Symbol Read/Write After reset Function Bit Symbol Read/Write After reset Function RUI31 0 23 RUI23 0 15 RUI15 0 7 RUI7 0 30 RUI30 0 22 RUI22 0 14 RUI14 0 6 RUI6 0 29 RUI29 0 21 RUI21 0 13 RUI13 0 5 RUI5 0 28 RUI28 27 RUI27 26 RUI26 0 18 RUI18 0 10 RUI10 0 2 RUI2 0 25 RUI25 0 17 RUI17 0 9 RUI9 0 1 RUI1 0 24 RUI24 0 16 RUI16 0 8 RUI8 0 0 RUI0 0
R/W 0 0 Accumulate count value 20 RUI20 R/W 0 0 Accumulate count value 12 RUI12 11 RUI11 19 RUI19
R/W 0 0 Accumulate count value 4 RUI4 R/W 0 0 Accumulate count value 3 RUI3
Fig. 17.6.2.3 Clock Count Cumulative Register (Note) (Note) (Note) (Note) Values read from this register are undefined until /BRESET is activated. To access this register, 32-bit access is required. A write to this cumulative register clears the prescaler. Interrupts must be disabled during a read.
TMP19A64(rev1.1)-17-8
TMP19A64C1D
Example of the clock timer interrupt setting: Initialization
IMCD RTCCR 76543210 00100000 0000XXX0
IMCGD 00110001 EICRCG 0 0 0 0 1 1 0 1 INTCLR RTCCR IMCD 01111000 00001XX1 00100XXX
Disables the interrupt INTRTC Sets the bit <23:16> of a 32-bit register Stops the RTC timer count Sets the bit <7:0> of a 32-bit register Sets the bit <15:8> of a 32-bit register Clears the interrupt request for the CG block Set the bit <7:0> of a 32-bit register Clears the interrupt request for the INTC block Sets the bit <8:0> of a 32-bit register Starts the timer count Sets the bit <7:0> of a 32-bit register Sets the interrupt level Set the bit <23:16> of a 32-bit register
INTRTC interrupt
EICRCG INTCLR 76543210 00001101 01111000
Clears the interrupt request for the CG block Sets the bit <7:0> of a 32-bit register Clears the interrupt request for the INTC block Sets the bit <8:0> of a 32-bit register
Processing Interruption finished
(Note 1) X means "don't care." (Note 2) To disable the interrupt generated in standby mode, IMCD must be first set and then IMCGD.
TMP19A64(rev1.1)-17-9
TMP19A64C1D
18. Key-on Wakeup
18.1 Outline
* The TMP19A64 has 8 key inputs, KEY0 to KEY7, which can be used for releasing the STOP/SLEEP mode or for external interrupts. Note that interrupt processing is executed with one interrupt factor for the 8 inputs. Each key input can be configured to be used or not, by programming (KWUPSTn). The active state of each input can be configured to the rising edge, the falling edge, the high level or the low level, by programming (KWUPSTn). An interrupt request is cleared by reading the key interrupt state register KWUPST in the interrupt processing. The key input pins have pull-up functions, which can be enabled or disabled by programming the key pull-up control register KUPPUP.
* * *
18.2 Key-on Wakeup Operation
The TMP19A64 has 8 key input pins, KEY0 to KEY7. Program the IMCGC0 register in the CG to determine whether to use the key inputs for releasing the STOP/SLEEP mode or for normal interrupts. Setting to "1" causes all the key inputs, KEY0 to KEY7, to be used for interrupts for releasing the STOP/SLEEP mode. Program KWUPSTn to enable or disable interrupt inputs for each key input pin. Also, program KWUPSTn to define the active state of each key input pin to be used. Detection of key inputs is carried out in the KWUP block, and the detection results are notified to the IMCGD register in the CG as the active high level. Therefore, program IMCGD to "01" to determine the detection level to the high level. The results of detection in the CG are also notified to the interrupt controller INTC as the active high level. Therefore, program the INTC to "01" to define the corresponding interrupt as the high level. Setting IMCGD to 0 (default) configures all the input pins, KEY0 to KEY7 to the normal interrupts. In this case, you don't have to make settings at the CG, but just specify the INTC detection level to the high level. Program KWUPSTn in the same way to enable or disable each key input and define their active states. Reading KWUPST during interrupt processing clears the generated key interrupt requests. (Note) If two or more key inputs are generated, the interrupt requests, which have been generated before the sequence of clearing the interrupt requests carried out in the interrupt processing routine that corresponds to the first key input, will be cleared at the same time. Key interrupts are generated again for the interrupt requests that are generated after the said sequence of clearing the interrupt requests.
18.3 Pull-up Function
Each key input has the pull-up function. Pull-up can be enabled for each bit of key inputs KEY0 to KEY7 by setting KUPPUP to "1." The pull-up function does not work for the key inputs that are disabled at KWUPSTn, independently of the KUPPUP setting.
TMP19A64(rev1.1)-18-1
TMP19A64C1D
Cautions on use of key inputs with pull-up enabled A) When you make the first setting after turning the power ON 1) Set KUPPUP ( ="1"). 2) Set KWUPSTn to "1" for the KEYn input to be used. 3) Wait until the pull-up operation is completed. 4) Set KWUPSTn to define the active state of the KEYn input to be used. 5) Clear interrupt requests by reading KWUPST. 6) Set CG and the INTC. (Refer to Chapter 6, "Interrupt Settings" for the details of setting methods.) B) To change the active state of a key input during operation 1) Disable key interrupts by setting IMC3 to "000" at the INTC. 2) Change the active state by setting KWUPSTn for the KEYn input to be changed. 3) Clear interrupt requests by reading KWUPST. 4) Enable the key interrupt at the INTC. (Set IMC3 to a desired level.) C) To enable a key input during operation 1) Disable key interrupts by setting IMC3 to "000" at the INTC. 2) Set KWUPSTn to "1" for the key input to be used. 3) Wait until the pull-up operation is completed. 4) Define the active state of the key input to be used at the corresponding KWUPSTn. 5) Clear interrupt requests by reading KWUPST. 6) Enable key interrupts at the INTC. (Set IMC3< ILD2:D0> to a desired level.) Cautions on use of key inputs with pull-up disabled A) When you make the first setting after turning the power ON 1) Set KUPPUP ( ="0") 2) Set KWUPSTn to define the active state of the KEYn input to be used. 3) Clear interrupt requests by reading KWUPST. 4) Set KWUPSTn to "1" for the KEYn input to be used. 5) Set CG and the INTC. (Refer to Chapter 6, "Interrupt Settings" for the details of setting methods.) B) To change the active state of a key input during operation 1) Disable key interrupts by setting IMC3 to "000" at the INTC. 2) Change the active state by setting KWUPSTn for the key input to be changed. 3) Clear interrupt requests by reading KWUPST. 4) Enable key interrupts at the INTC. (Set IMC3< ILD2:D0> to a desired level.) C) To enable a key input during operation 1) Disable key interrupts by setting IMC3 to "000" at the INTC. 2) Define the active state by setting KWUPSTn for the key input to be used. 3) Clear interrupt requests by reading KWUPST. 4) Set KWUPSTn to "1" for the key input to be used. 5) Enable key interrupts at the INTC. (Set IMC3 to a desired level.)
TMP19A64(rev1.1)-18-2
TMP19A64C1D
Key pull-up control register: KUPPUP
7 bit Symbol KUPPUP (0xFFFF_F371) Read/Write After reset Function 6 5 4 R/W 0
0: Pull-up disabled 1: Pull-up enabled
3
2
1
0
KEYPUP7 KEYPUP6 KEYPUP5 KEYPUP4 KEYPUP3 KEYPUP2 KEYPUP1 KEYPUP0 0
0: Pull-up disabled 1: Pull-up enabled
0
0: Pull-up disabled 1: Pull-up enabled
0
0: Pull-up disabled 1: Pull-up enabled
0
0: Pull-up disabled 1: Pull-up enabled
0
0: Pull-up disabled 1: Pull-up enabled
0
0: Pull-up disabled 1: Pull-up enabled
0
0: Pull-up disabled 1: Pull-up enabled
18.4 Key Input Detection
1) Pull-up disabled/enabled The active state of each KEYn input can be defined to the high or low level or to the rising and/or falling edges by setting KWUPSTn. The active states of KEYn inputs are continuously detected.
TMP19A64(rev1.1)-18-3
TMP19A64C1D
7 KWUPST0 bit Symbol R 0 (0xFFFF_F360) Read/Write After reset Function
6
5 KEY01
4 KEY00
3
2 R 0
1
0 KEY0EN R/W 0 KEY0 interrupt input 0: Disable 1: Enable
0
R/W 1 0 Define the KEY0 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge 5 KEY11 4 KEY10
0
0
7 KWUPST1 bit Symbol R 0 (0xFFFF_F361) Read/Write After reset Function
6
3
2 R 0
1
0 KEY1EN R/W 0 KEY1 interrupt input 0: Disable 1: Enable
0
R/W 1 0 Define the KEY1 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge 5 KEY21 4 KEY20
0
0
7 KWUPST2 bit Symbol R 0 (0xFFFF_F362) Read/Write After reset Function
6
3
2 R 0
1
0 KEY2EN R/W 0 KEY2 interrupt input 0: Disable 1: Enable
0
R/W 1 0 Define the KEY2 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge 5 KEY31 R/W 4 KEY30
0
0
7 KWUPST3 bit Symbol R 0 After reset Function (0xFFFF_F363) Read/Write
6
3
2 R
1
0 KEY3EN R/W
0
1 0 Define the KEY3 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0
0
0
0 KEY3 interrupt input 0: Disable 1: Enable
TMP19A64(rev1.1)-18-4
TMP19A64C1D
7 KWUPST4 bit Symbol R 0 (0xFFFF_F364) Read/Write After reset Function
6
5 KEY41
4 KEY40
3
2 R 0
1
0 KEY4EN R/W 0 KEY4 interrupt input 0: Disable 1: Enable
0
R/W 1 0 Define the KEY4 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge 5 KEY51 4 KEY50
0
0
7 KWUPST5 bit Symbol R 0 (0xFFFF_F365) Read/Write After reset Function
6
3
2 R 0
1
0 KEY5EN R/W 0 KEY5 interrupt input 0: Disable 1: Enable
0
R/W 1 0 Define the KEY5 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge 5 KEY61 4 KEY60
0
0
7 KWUPST6 bit Symbol R 0 (0xFFFF_F366) Read/Write After reset Function
6
3
2 R 0
1
0 KEY6EN R/W 0 KEY6 interrupt input 0: Disable 1: Enable
0
R/W 1 0 Define the KEY6 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge 5 KEY71 R/W 4 KEY70
0
0
7 KWUPST7 bit Symbol R 0 After reset Function (0xFFFF_F367) Read/Write
6
3
2 R
1
0 KEY7EN R/W
0
1 0 Define the KEY7 active state 00: "L" level 01: "H" level 10: Falling edge 11: Rising edge
0
0
0
0 KEY7 interrupt input 0: Disable 1: Enable
TMP19A64(rev1.1)-18-5
TMP19A64C1D
18.5 Detection of Key Input Interrupts and Clearance of Requests
When KEYnEN is set to 1 and an active signal is input to KEYn, the KEYINTn channel that corresponds to KWUPST is set to "1," indicating that an interrupt is generated. The KWUPST is the read-only register. Reading this register clears the corresponding bit that has been set to "1." If the active state is set to the high or low level, the corresponding bit of the KWUPST register remains "1" after it is read, unless the external input is withdrawn. KEY interrupt state register: KWUPST
7 KWUPST (0xFFFF_F370) bit Symbol Read/Write After reset Function KEYINT7 0 KEY7 interrupt state 6 KEYINT6 0 KEY6 interrupt state 5 KEYINT5 0 KEY5 interrupt state 4 KEYINT4 R 0 KEY4 interrupt state 0 KEY3 interrupt state 0 KEY2 interrupt state 0 KEY1 interrupt state 0 KEY0 interrupt state 3 KEYINT3 2 KEYINT2 1 KEYINT1 0 KEYINT0
0: No 0: No 0: No 0: No 0: No 0: No 0: No 0: No interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt generated generated generated generated generated generated generated generated 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt 1: Interrupt generated generated generated generated generated generated generated generated
TMP19A64(rev1.1)-18-6
TMP19A64C1D
19. ROM Correction Function
This chapter describes the ROM correction function built into the TMP19A64.
19.1
Features
* * Using this function, eight pieces of one-word data or four pieces of eight-word data can be replaced. If an address (lower 5 or 2 bits are "don't care" bits) written to the address register matches an address generated by the PC or DMAC, ROM data is replaced by data generated by the ROM correction data register which is established in a RAM area assigned to the above address register. ROM correction is automatically authorized by writing an address to each address register.
*
19.2
Description of Operations
By setting in the address register ADDREGn a physical address (including a projection area) of the ROM area to be corrected, ROM data can be replaced by data generated by a data register in a RAM area assigned to ADDREGn. The ROM correction function is automatically enabled when an address is set in ADDREGn, and it cannot be disabled. After a reset, the ROM correction function is disabled. Therefore, to execute ROM correction with the initial setting after a reset is cleared, it is necessary to set an address in ADDREG. As an address is set in ADDREG, the ROM correction function is enabled for this register. If the CPU has the bus right, ROM data is replaced when the value generated by the PC matches that of the address register. If the DMAC has the bus right, ROM data is replaced when a source or destination address generated by the DMAC matches the value of the address register. For example, if an address is set in ADDREG0 and ADDREG3, the ROM correction function is enabled for this area; match detection is performed on these registers, and data replacement is executed if there is a match. Data replacement is not executed for ADDREG1, ADDREG2, and ADDREG4 through ADDREG7. Although the bit <31:5> exists in address registers, match detection is performed on A<20:5>. Internal processing is that data replacement is executed by multiplying the ROMCS signal showing a ROM area by the result of a match detection operation performed by ROM correction circuitry. If eight-word data is replaced, an address for ROM correction can be established only on an eight-word boundary, and data is replaced in units of 32 bytes. If only part of 32-byte data must be replaced with different data, the addresses that do not need to be replaced must be overwritten with the same data as the one existing prior to data replacement.
TMP19A64(rev1.1)-19-1
TMP19A64C1D
ADDREGn registers and RAM areas assigned to them are as follows:
Register Address 0xFFFF_E540 0xFFFF_E544 0xFFFF_E548 0xFFFF_E54C 0xFFFF_E550 0xFFFF_E554 0xFFFF_E558 0xFFFF_E55C 0xFFFF_E560 0xFFFF_E564 0xFFFF_E568 0xFFFF_E56C RAM area Number of words
ADDREG0 ADDREG1 ADDREG2 ADDREG3 ADDREG4 ADDREG5 ADDREG6 ADDREG7 ADDREG8 ADDREG9 ADDREGA ADDREGB
0xFFFD_FF60 - 0xFFFD_FF7F 0xFFFD_FF80 - 0xFFFD_FF9F 0xFFFD_FFA0 - 0xFFFD_FFBF 0xFFFD_FFC0 - 0xFFFD_FFDF 0xFFFD_FFE0 - 0xFFFD_FFE3 0xFFFD_FFE4 - 0xFFFD_FFE7 0xFFFD_FFE8 - 0xFFFD_FFEB 0xFFFD_FFEC - 0xFFFD_FFEF 0xFFFD_FFF0 - 0xFFFD_FFE3 0xFFFD_FFF4 - 0xFFFD_FFE7 0xFFFD_FFF8 - 0xFFFD_FFEB 0xFFFD_FFFC - 0xFFFD_FFEF
8 8 8 8 1 1 1 1 1 1 1 1
TMP19A64(rev1.1)-19-2
TMP19A64C1D
Internal bus
Address register ADDREGn
Write detection & hold circuit of ADDREGn
Authorize comparison
Conversion circuit
RAM
ROM
Comparison circuit
Selector
Operand Address
Instruction Address
TX19A processor
Selector
Operand Data
Instruction Data
Bus interface circuit
Fig. 19.2.1 ROM Correction System Diagram
TMP19A64(rev1.1)-19-3
TMP19A64C1D
19.3
Registers
(1) Address registers
7 6 ADD06 R/W 0 14 ADD014 0 22 ADD022 0 30 ADD030 0 5 ADD05 0 13 ADD013 0 21 ADD021 0 29 ADD029 0 1 12 ADD012 0 20 ADD020 0 28 R/W 0 31 bit Symbol Read/Write After reset ADD031 0 0 27 0 26 ADD026 0 0 25 ADD025 0 0 24 ADD024 0 R/W 0 23 bit Symbol Read/Write After reset ADD023 0 19 ADD019 0 18 ADD018 0 17 ADD017 0 16 ADD016 1 11 ADD011 R 1 10 ADD010 1 9 ADD09 1 8 ADD08 4 3 2 1 0
ADDREG0 (0xFFFF_E540)
bit Symbol Read/Write After reset bit Symbol Read/Write After reset
ADD07 0 15 ADD015
ADD028 ADD027 R/W 0 0
7 ADDREG1 (0xFFFF_E544) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD17 0 15 ADD115 0 23 ADD123 0 31 ADD131 0
6 ADD16 R/W 0 14 ADD114 0 22 ADD122 0 30 ADD130 0
5 ADD15 0 13 ADD113 0 21 ADD121 0 29 ADD129 0
4
3
2 R 1 10 ADD110 0 18 ADD118 0 26 ADD126 0
1
0
1 12
1 11
1 9 ADD19 0 17 ADD117 0 25 ADD125 0
1 8 ADD18 0 16 ADD116 0 24 ADD124 0
ADD112 ADD111 R/W 0 20 ADD120 0 28 ADD128 0 R/W 0 R/W 0 27 ADD127 0 19 ADD119
7 ADDREG2 (0xFFFF_E548) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD27 0 15 ADD215 0 23 ADD223 0 31 ADD231 0
6 ADD26 R/W 0 14 ADD214 0 22 ADD222 0 30 ADD230 0
5 ADD25 0 13 ADD213 0 21 ADD221 0 29 ADD229 0
4
3
2 R 1 10 ADD210 0 18 ADD218 0 26 ADD226 0
1
0
1 12 ADD212 0 20 R/W
1 11 ADD211 0 19
1 9 ADD29 0 17 ADD217 0 25 ADD225 0
1 8 ADD28 0 16 ADD216 0 24 ADD224 0
ADD220 ADD219 R/W 0 28 ADD228 0 R/W 0 0 27 ADD227
TMP19A64(rev1.1)-19-4
TMP19A64C1D
7 ADDREG3 (0xFFFF_E54C) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD37 0 15 ADD315 0 23 ADD323 0 31 ADD331 0
6 ADD36 R/W 0 14 ADD314 0 22 ADD322 0 30 ADD330 0
5 ADD35 0 13 ADD313 0 21 ADD321 0 29 ADD329 0
4
3
2 R 1 10 ADD310 0 18 ADD318 0 26 ADD326 0
1
0
1 12
1 11
1 9 ADD39 0 17 ADD317 0 25 ADD325 0
1 8 ADD38 0 16 ADD316 0 24 ADD324 0
ADD312 ADD311 R/W 0 0 20 ADD320 0 28 ADD328 0 R/W 0 R/W 0 27 ADD327 19 ADD319
7 ADDREG4 (0xFFFF_E550) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD47 0 15 ADD415 0 23 ADD423 0 31 ADD431 0 7 ADDREG5 (0xFFFF_E554) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD57 0 15 ADD515 0 23 ADD523 0 31 ADD531 0
6 ADD46 0 14 ADD414 0 22 ADD422 0 30 ADD430 0 6 ADD56 0 14 ADD514 0 22 ADD522 0 30 ADD530 0
5 ADD45 R/W 0 13 ADD413 0 21 ADD421 0 29 ADD429 0 5 ADD55 R/W 0 13 ADD513 0 21 ADD521 0 29 ADD529 0
4 ADD44 0 12 ADD412 0 20 R/W
3 ADD43 0 11 ADD411 0 19
2 ADD42
1 R
0
0 10 ADD410 0 18 ADD418 0 26 ADD426 0 2 ADD52
1 9 ADD49 0 17 ADD417 0 25 ADD425 0 1 R
1 8 ADD48 0 16 ADD416 0 24 ADD424 0 0
ADD420 ADD419 R/W 0 28 ADD428 0 4 ADD54 0 12 R/W 0 3 ADD53 0 11 0 27 ADD427
0 10 ADD510 0 18 ADD518 0 26 ADD526 0
1 9 ADD59 0 17 ADD517 0 25 ADD525 0
1 8 ADD58 0 16 ADD516 0 24 ADD524 0
ADD512 ADD511 R/W 0 20 ADD520 0 28 ADD528 0 R/W 0 R/W 0 27 ADD527 0 19 ADD519
TMP19A64(rev1.1)-19-5
TMP19A64C1D
7 ADDREG6 (0xFFFF_E558) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD67 0 15 ADD615 0 23 ADD623 0 31 ADD631 0 7 ADDREG7 (0xFFFF_E55C) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD77 0 15 ADD715 0 23 ADD723 0 31 ADD731 0 7 ADDREG8 (0xFFFF_E560) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD87 0 15 ADD815 0 23 ADD823 0 31 ADD831 0
6 ADD66 0 14 ADD614 0 22 ADD622 0 30 ADD630 0 6 ADD76 0 14 ADD714 0 22 ADD722 0 30 ADD730 0 6 ADD86 0 14 ADD814 0 22 ADD822 0 30 ADD830 0
5 ADD65 R/W 0 13 ADD613 0 21 ADD621 0 29 ADD629 0 5 ADD75 R/W 0 13 ADD713 0 21 ADD721 0 29 ADD729 0 5 ADD85 R/W 0 13 ADD813 0 21 ADD821 0 29 ADD829 0
4 ADD64 0 12
3 ADD63 0 11
2 ADD62
1 R
0
0 10 ADD610 0 18 ADD618 0 26 ADD626 0 2 ADD72
1 9 ADD69 0 17 ADD617 0 25 ADD625 0 1 R
1 8 ADD68 0 16 ADD616 0 24 ADD624 0 0
ADD612 ADD611 R/W 0 0 20 ADD620 0 28 ADD628 0 4 ADD74 0 12 ADD712 0 20 R/W 0 19 R/W 0 3 ADD73 0 11 ADD711 R/W 0 27 ADD627 19 ADD619
0 10 ADD710 0 18 ADD718 0 26 ADD726 0 2 ADD82
1 9 ADD79 0 17 ADD717 0 25 ADD725 0 1 R
1 8 ADD78 0 16 ADD716 0 24 ADD724 0 0
ADD720 ADD719 R/W 0 28 ADD728 0 4 ADD84 0 12 R/W 0 3 ADD83 0 11 0 27 ADD727
0 10 ADD810 0 18 ADD818 0 26 ADD826 0
1 9 ADD89 0 17 ADD817 0 25 ADD825 0
1 8 ADD88 0 16 ADD816 0 24 ADD824 0
ADD812 ADD811 R/W 0 20 ADD820 0 28 ADD828 0 R/W 0 R/W 0 27 ADD827 0 19 ADD819
TMP19A64(rev1.1)-19-6
TMP19A64C1D
7 ADDREG9 (0xFFFF_E564) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADD97 0 15 ADD915 0 23 ADD923 0 31 ADD931 0 7 ADDREGA (0xFFFF_E568) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADDA7 0 15 ADDA15 0 23 ADDA23 0 31 ADDA31 0 7 ADDREGB (0xFFFF_E56C) bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset bit Symbol Read/Write After reset ADDB7 0 15 ADDB15 0 23 ADDB23 0 31 ADDB31 0
6 ADD96 0 14 ADD914 0 22 ADD922 0 30 ADD930 0 6 ADDA6 0 14 ADDA14 0 22 ADDA22 0 30 ADDA30 0 6 ADDB6 0 14 ADDB14 0 22 ADDB22 0 30 ADDB30 0
5 ADD95 R/W 0 13 ADD913 0 21 ADD921 0 29 ADD929 0 5
4 ADD94 0 12
3 ADD93 0 11
2 ADD92
1 R
0
0 10 ADD910 0 18 ADD918 0 26 ADD926 0 2 ADDA2
1 9 ADD99 0 17 ADD917 0 25 ADD925 0 1 R
1 8 ADD98 0 16 ADD916 0 24 ADD924 0 0
ADD912 ADD911 R/W 0 0 20 ADD920 0 28 ADD928 0 4 R/W 0 3 ADDA3 0 11 ADDA11 0 19 R/W R/W 0 27 ADD927 19 ADD919
ADDA5 ADDA4 R/W 0 0 13 ADDA13 0 21 ADDA21 0 29 ADDA29 0 5 ADDB5 R/W 0 13 ADDB13 0 21 ADDB21 0 29 ADDB29 0 0 12 12 ADDA12 0 20
0 10 ADDA10 0 18 ADDA18 0 26 ADDA26 0 2 ADDB2
1 9 ADDA9 0 17 ADDA17 0 25 ADDA25 0 1 R
1 8 ADDA8 0 16 ADDA16 0 24 ADDA24 0 0
ADDA20 ADDA19 R/W 0 28 ADDA28 0 4 ADDB4 R/W 0 3 ADDB3 0 11 0 27 ADDA27
0 10 ADDB10 0 18 ADDB18 0 26 ADDB26 0
1 9 ADDB9 0 17 ADDB17 0 25 ADDB25 0
1 8 ADDB8 0 16 ADDB16 0 24 ADDB24 0
ADDB12 ADDB11 R/W 0 20 ADDB20 0 28 ADDB28 0 R/W 0 R/W 0 27 ADDB27 0 19 ADDB19
TMP19A64(rev1.1)-19-7
TMP19A64C1D
(Note 1) Data cannot be transferred by DMA to the address register. However, data can be transferred by DMA to the RAM area where data for replacement is placed. The ROM correction function supports data replacement for both CPU and DMA access. (Note 2) Writing back the initial value "0x00" allows data at the reset address to be replaced.
TMP19A64(rev1.1)-19-8
TMP19A64C1D
20. Security Function
20.1 General
This device is implemented with the ROM security function for the internal ROM (flash) area as well as the DSU security function to inhibit use of DSU (DSU-Probes). The following three security functions are available: * * * Flash security ROM security DSU security
20.2 Features
20.2.1 Flash Security
The flash security function refers to the condition where all the memory areas are protected through the automatic protection bit programming function to use the FLCS bits inhibiting write and erase operations of the internal ROM data for individual protection areas (in 512 kB blocks). In this case, the flash memory cannot be read from any area outside the flash memory such as the internal RAM areas where the protection bit erase command cannot be accepted. After this, no command writing can be performed normally. The flash security function is also a function to be necessary in enabling the ROM security and DSU security functions. When the automatic protection bit erase command is executed while the system is in a secure condition, the flash memory is automatically initialized within the device. Therefore, be sufficiently careful in making a transition to a secure state.
20.2.2
ROM Security
The ROM security function can inhibit data write/read operations to/from the internal ROM. This function is used together with the flash security function. Although the PC of RAM area instructions that have been replaced from the ROM area through the ROM correction function indicates an address in the flash ROM area, it is actually in the RAM area and thus data cannot be read in the condition ROM security is in place. For reading data using an instruction in the RAM area that has been replaced from the ROM area, some special method such as to use a program in the ROM area to write the data value into RAM will be necessary. When the ROM security is applied to the ROM area, the following operations are inhibited: * * * * * * * Operation to load or store ROM area data using an instruction placed outside the ROM area DMAC data transfer of ROM area data EJTAG based operation to load or store ROM area data Boot ROM operation to load or store ROM area data Flash writer operation to load or store ROM area data Access to security related registers (ROMSEC1 and ROMSEC2) in the ROM area using an instruction placed outside the ROM area. Execution of any flash command sequence other than the automatic block protection clear command and automatic block security clear command in the writer mode and any flash command sequence in the single mode or boot mode that specifies an address in the ROM area
TMP19A64(rev1.1)-20-1
TMP19A64C1D
Even when the ROM security is applied to the ROM area, the following operations can be performed: * * * * Loading of ROM area data using an instruction placed in the ROM area Loading of data outside the ROM area to use an instruction placed in any area Branch instruction to jump to the ROM area to use an instruction placed in any area PC trace (with some limitations) and break operations in the ROM area to use EJTAG
20.2.3
DSU Security
The DSU security function prevents easy reading of the internal flash memory by a third party other than the authorized user when an onboard DSU probe is used. By enabling the DSU security function, it becomes impossible to read the internal flash memory from a DSU probe. This function is used together with the flash security function.
TMP19A64(rev1.1)-20-2
TMP19A64C1D
20.3 Outline Security Configuration and Correspondence Table
19A64F20A
CS_DMAC ROMSEC1
Generation of bus error exception
ROM security
Chip 1
When DMAC register is written from outside internal ROM
Chip 0
If "1111," flash security
DSUSEC1
DSU security
Protection bits FLCS
Fig. 21.3.1 Various Security Conditions (Outline)
Table 21.3.1 Various Security Conditions in Each Mode
Protection bit setting, FLCS ROM security enable bit, ROMSEC1 DSU security enable bit, DSUSEC1 Flash security state ROM security state DSU security state Flash read from the internal ROM Flash read from outside the internal ROM ROM security enable clear (from ROM) ROM security enable clear (from outside ROM) Single/Single Boot DSU security enable clear (from ROM) mode DSU security enable clear (from outside ROM) Generation of protection bit erase command
Generation of command other than protection bit erase command
1111 1 1 ON ON x *1 x *2 x *3 x *4 x *5 x *6 x *1 *8 x *7 OFF x *1 x *2 ON 0 ON OFF OFF 1 0 0
1111 Don't Care Don't Care OFF OFF OFF
x *4 x *5 x *6 x *1 *8 x *7
*8 x *7
*8 x *7
*9
Write to DMAC configuration register (from ROM)
Write to DMAC configuration register (from outside ROM)
Writer mode
Flash read Generation of protection bit erase command
Generation of command other than protection bit erase command
x *1 *8 x *7
x *1 *8 x *7
*9 *9
*1 : Always reads "0x00000098." *2 : Masks the stored data (Register cannot be written or cleared.) *3 : Masks the stored data (Register cannot be written or cleared.) *4 : Command address is masked and the flash memory cannot recognize the command. *5 : Command address is masked and the flash memory cannot recognize the command. *6 : Bus error exceptions are generated. (When set to DMAC register.) *7 : Commands are not recognized because of the flash security state. *8 : Commands result in flash area erase and protection bit erase operations because of the flash security state. *9 : Command conversion is performed in the flash interface according to the protection bit status and input command.
TMP19A64(rev1.1)-20-3
TMP19A64C1D
20.4 Register
Flash control/ status register This resister is used to monitor the status of the flash memory and to indicate the block protection status. Table 21.3.2 Flash Control Register
7 FLCS Bit Symbol (0xFFFF_E520) Read/Write After power on reset Function 6 5 4 3 R 0 2 ROMTYPE R 0 1 PRGB R/W 0 0 RDY/BSY R 1 PROTECT3 PROTECT2 PROTECT1 PROTECT0 R 0 0 0 0
Protection area setting (in 512 kB blocks) 0000: No blocks are protected xxx1: Area 0 is protected xx1x: Area 1 is protected x1xx: Area 2 is protected 1xxx: Area 3 is protected 15 14 13 12 R 0 0 0 0 0 11
ROM ID bit Programming Ready/Busy 0: Flash 1: MROM
bit 0: Already issued 1: Issue 0: In operation 1: Finished operation
10
9
8
Bit Symbol Read/Write After power on reset Function Bit Symbol Read/Write After power on reset Function 31 Bit Symbol Read/Write After power on reset Function R 0 0 0 0 0 0 0 0 30 29 28 27 26 25 24 R 0 0 0 0 0 0 0 0 0 0 0
23
22
21
20
19
18
17
16
Bit 0: Ready/Busy flag bit The RDY/BSY output is provided as a means to monitor the status of automatic operation. This bit is a function bit for the CPU to monitor the function. When the flash memory is in automatic operation, it outputs "0" to indicate that it is busy. When the automatic operation is terminated, it returns to the ready state and outputs "1" to accept the next command. If the automatic operation has failed, this bit maintains the "0" output. It returns to "1" upon power on.
(Note) Be sure to confirm the ready status whenever a command is to be issued. Issuing a command while the device is busy may result in a situation where any further command inputs are rejected in addition to the fact that the command cannot be transferred correctly. In such a case, restore the system by using system reset or a reset command.
Bit 1: Programming bit This bit notifies the flash interface that a command is to be issued to the flash memory. Be sure to set this bit to "1" whenever a command is to be issued to the internal flash memory. Also, when all commands have been issued, set this bit to "0" after confirming that the bit has been set to "1." Bit 2: ROM type identification bit This bit is read after reset to identify whether the ROM is a flash ROM or a mask ROM. Flash ROM: "0" Mask ROM: "1" Bits [7:4]: Protection bits (x: can be set to any combination of areas) Each of the protection bits (4 bits) represents the protection status of the corresponding area. When a bit is set to "1," it indicates that the area corresponding to the bit is protected. When the area is protected, data cannot be written into it.
TMP19A64(rev1.1)-20-4
TMP19A64C1D
Table 21.3.3 ROM Security Register
7 ROMSEC1 (0xFFFF_E518) Bit Symbol Read/Write After power on reset Function 6 5 4 R 0 Always reads "0." 3 2 1 0 RSECON R/W 1 ROM ROM security 1: ON 0: OFF (Note) 10 R 0 Always reads "0." 23 Bit Symbol Read/Write After power on reset Function 31 Bit Symbol Read/Write After power on reset Function 30 29 28 22 21 20 19 R 0 18 17 16 9 8
15 Bit Symbol Read/Write After power on reset Function
14
13
12
11
27 R 0 Always reads "0."
26
25
24
(Note) (Note)
This register can be initialized only by a power on reset. Normal reset inputs cannot reset the register. This register must be 32-bit accessed.
TMP19A64(rev1.1)-20-5
TMP19A64C1D
Table 21.3.4 Security Lock Register
7 ROMSEC2 Bit Symbol (0xFFFF_E51C) Read/Write After reset Function 15 Bit Symbol Read/Write After reset Function 23 Bit Symbol Read/Write After reset Function 31 Bit Symbol Read/Write After reset Function 30 29 22 21 14 13 6 5 4 3 2 1 0
W Undefined Refer to the note. 12 11 10 9 8
W Undefined Refer to the note. 20 19 18 17 16
W Undefined Refer to the note. 28 27 26 25 24
W Undefined Refer to the note.
(Note) (Note) (Note) (Note)
After setting ROMSEC1 , setting "0x0000_003D" to this register sets the value to ROMSEC1 . When ROM security is applied to a ROM area, the ROMSEC1 and ROMSEC2 registers can be accessed only from an instruction placed in the ROM area. This register must be 32-bit accessed. This register is a write-only register. Any value read is undefined.
TMP19A64(rev1.1)-20-6
TMP19A64C1D
Table 21.3.5 DSU Security Mode Register
7 DSUSEC1 (0xFFFF_E510) Bit Symbol Read/Write After power on reset Function 15 Bit Symbol Read/Write After power on reset Function 23 Bit Symbol Read/Write After power on reset Function 31 Bit Symbol Read/Write After power on reset Function (Note) (Note) 30 29 28 22 21 14 13 6 5 4 R 0 Always reads "0." 12 11 R 0 Always reads "0." 20 19 R 0 18 17 16 10 9 3 2 1 0 DSUOFF R/W 1 1: DSU disable 0: DSU enable 8
27 R 0
26
25
24
Always reads "0."
This register can be initialized only by a power on reset. Normal reset inputs cannot reset the register. This register must be 32-bit accessed.
Table 21.3.6 DSU Security Control Register
7 DSUSEC2 (0xFFFF_E514) Bit Symbol Read/Write After reset Function 15 Bit Symbol Read/Write After reset Function 23 Bit Symbol Read/Write After reset Function 31 Bit Symbol Read/Write After reset Function (Note) (Note) 30 29 22 21 14 13 6 5 4 3 2 1 0
DSECODE07 DSECODE06 DSECODE05 DSECODE04 DSECODE03 DSECODE02 DSECODE01 DSECODE00
W 0 Write "0x0000_00C5." 12 11 10 9 8
DSECODE15 DSECODE14 DSECODE13 DSECODE12 DSECODE11 DSECODE10 DSECODE09 DSECODE08
W 0 Write "0x0000_00C5." 20 W 0 Write "0x0000_00C5." 28 27 26 25 24
DSECODE31 DSECODE30 DSECODE29 DSECODE28 DSECODE27 DSECODE26 DSECODE25 DSECODE24
19
18
17
16
DSECODE23 DSECODE22 DSECODE21 DSECODE20 DSECODE19 DSECODE18 DSECODE17 DSECODE16
W 0 Write "0x0000_00C5."
This register must be 32-bit accessed. This register is a write-only register. Any value read is undefined.
TMP19A64(rev1.1)-20-7
TMP19A64C1D
20.5 Setting Security Configuration
If it is necessary to rewrite the flash memory or protection bits while the device is in a secure state, either perform the automatic protection bit erase operation or clear the ROM security function. While the DSU security is applied, any DSU cannot be used. The setting is necessary to make DSU-probe available beforehand if an automatic protection bit programming is executed to result in a flash security state. When the automatic protection bit erase command is executed while the system is in the flash security mode, the flash memory is automatically initialized within the device. Therefore, be sufficiently careful in making a transition to a secure state.
20.5.1
Flash Security
Setting or clearing of flash security is made using a command sequence to the flash memory to use the protection bit programming command. Refer to command sequence descriptions in the section describing flash memory operation for more details.
20.5.2
ROM Security
In order to prevent the ROM security function from being accidentally removed by system runaway, etc., a double action method is used to set or clear the ROM security function. To make ROM security functional, first set the ROM security register ROMSEC1 to "1" and then write the security code "0x0000_003D" to the ROM security lock register ROMSEC2. Similarly, when the ROM security function is to be cleared, first set the ROM security register ROMSEC1 to "0" and then write the security code "0x0000_003D" to the ROM security lock register ROMSEC2. (Note) The ROM security register has a power on reset circuit and the bit is set to "1" after power is turned on. If the flash security function is in place at this point, the ROM security function is automatically enabled to inhibit data write/read operations to/from the internal ROM.
20.5.3
DSU Security
DSU enable/disable (Enables or disables use of DSU probes for debugging) In order to prevent the DSU inhibit function from being accidentally removed by system runaway, etc., a double action method is used to clear the DSU inhibit function. So, first set the DSU security mode register DSUSEC1 to "0" and then write the security code "0x0000_00C5" to the DSU security control register DSUSEC2. Then, debugging to use a DSU probe is allowed. While power to the device is still applied, setting DSUSEC1 to "1" and writing "0x0000_00C5" to the DSUSEC2 register will enable the security function again. (Note) The DSU security mode register has a power on reset circuit and the bit is set to "1" after power is turned on. If the flash security function is in place at this point, the DSU security function is automatically enabled and it becomes impossible to read the internal flash memory from any DSU probe.
TMP19A64(rev1.1)-20-8
TMP19A64C1D 20.5.4 ROM Security Register: ROMSEC1
The ROM security register is provided with a power on reset circuit. Note that the data to be read from the ROMSEC1 bit is different from the original data written to the register. The outline schematic diagram is shown below:
ROMSEC1 read data ROMSEC1 write data D ROMSEC1 write CLK SD Reset SD Power on reset Q D Q ROM security
ROMSEC2 = 0x0000_003D In the ROM security state, any access from outside the ROM is inhibited.
Flash security
20.5.5
DSU Security Mode Register: DSUSEC1
The DSU security mode register is provided with a power on reset circuit. Note that the data to be read from the DSUSEC1 bit is different from the original data written to the register. The outline schematic diagram is shown below:
DSUSEC1 read data DSUSEC1 write data D DSUSEC1 write CLK SD Reset SD Power reset on Q D Q DSU security
DSUSEC2 = 0x0000_00C5 In the ROM security state, any access from outside the internal ROM is inhibited.
Flash security
TMP19A64(rev1.1)-20-9
TMP19A64C1D
21. Table of Special Function Registers
Special function registers are allocated to an 8K-byte address space from FFFFE000H to FFFFFFFFH. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] Port registers Watchdog timer 16-bit timer I2CBUS/serial channel UART/serial channel 10-bit A/D converter Key-on wake-up 32-bit input capture 32-bit compare Interrupt controller DMA controller Chip select/wait controller Access control Security control FLASH control ROM correction Clock timer Clock generator
(Note)
0xFFFF_F000 to 0xFFFF_FFFF are a little-endian area. 0xFFFF_E000 to 0xFFFF_EFFF are a bi-endian area. For continuous 8-bit long registers, 16- or 32-bit access is possible. The use of 16- or 32-bit access requires that an even-number address be accessed and that an even-number address does not contain undefined areas.
(Note)
TMP19A64(rev1.1)-21-1
TMP19A64C1D
Little-endian [1] PORT registers
ADR
FFFFF000H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
P0 P1 P0CR P1CR P1FC
ADR
FFFFF010H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADR
FFFFF020H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
P4CR P4FC
P2 P2CR P2FC
P3 P3CR P3FC
P5 P6
P4
P5CR P5FC P6CR P6FC
ADR
FFFFF040H 1H 2H 3H
Register name
P7 P8 P9 PA
ADR
FFFFF050H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
PB PC PD PE PBCR PCCR PDCR PECR PBFC PCFC PDFC PEFC
ADR
FFFFF060H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
PF PG PH PI PFCR PGCR PHCR PICR PFFC PGFC PHFC PIFC
ADR
Register name
FFFFF070H PJ 1H PK 2H 3H 4H PJCR 5H PKCR 6H 7H 8H PJFC 9H PKFC AH BH CH DH EH FH
4H 5H 6H 7H PACR 8H 9H AH BH CH DH EH FH P7FC P8FC P9FC PAFC
CH DH PCODE EH PDODE FH PEODE
CH PFODE DH EH FH
ADR
FFFFF0C0H 1H 2H 3H 4H 5H 6H 7H
Register name
PL PM PN PO PLCR PMCR PNCR POCR
ADR
Register name
FFFFF0D0H PP 1H PQ 2H 3H 4H PPCR 5H PQCR 6H 7H 8H PPFC 9H AH BH CH PPFC2 DH PQFC2 EH FH
8H 9H AH BH POFC CH DH EH FH POODE
TMP19A64(rev1.1)-21-2
TMP19A64C1D
Little-endian [2] WDT
ADR Register name
FFFFF090H WDMOD 1H WDCR 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[3] 16-bit timer
ADR
FFFFF140H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB0RUN TB0CR TB0MOD TB0FFCR TB0ST TB0UCL TB0UCH TB0RG0L TB0RG0H TB0RG1L TB0RG1H TB0CP0L TB0CP0H TB0CP1L TB0CP1H
ADR
FFFFF150H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB1RUN TB1CR TB1MOD TB1FFCR TB1ST TB1UCL TB1UCH TB1RG0L TB1RG0H TB1RG1L TB1RG1H TB1CP0L TB1CP0H TB1CP1L TB1CP1H
ADR
FFFFF160H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB2RUN TB2CR TB2MOD TB2FFCR TB2ST TB2UCL TB2UCH TB2RG0L TB2RG0H TB2RG1L TB2RG1H TB2CP0L TB2CP0H TB2CP1L TB2CP1H
ADR
FFFFF170H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB3RUN TB3CR TB3MOD TB3FFCR TB3ST TB3UCL TB3UCH TB3RG0L TB3RG0H TB3RG1L TB3RG1H TB3CP0L TB3CP0H TB3CP1L TB3CP1H
ADR
FFFFF180H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB4RUN TB4CR TB4MOD TB4FFCR TB4ST TB4UCL TB4UCH TB4RG0L TB4RG0H TB4RG1L TB4RG1H TB4CP0L TB4CP0H TB4CP1L TB4CP1H
ADR
FFFFF190H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB5RUN TB5CR TB5MOD TB5FFCR TB5ST TB5UCL TB5UCH TB5RG0L TB5RG0H TB5RG1L TB5RG1H TB5CP0L TB5CP0H TB5CP1L TB5CP1H
ADR
FFFFF1A0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB6RUN TB6CR TB6MOD TB6FFCR TB6ST TB6UCL TB6UCH TB6RG0L TB6RG0H TB6RG1L TB6RG1H TB6CP0L TB6CP0H TB6CP1L TB6CP1H
ADR
FFFFF1B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB7RUN TB7CR TB7MOD TB7FFCR TB7ST TB7UCL TB7UCH TB7RG0L TB7RG0H TB7RG1L TB7RG1H TB7CP0L TB7CP0H TB7CP1L TB7CP1H
TMP19A64(rev1.1)-21-3
TMP19A64C1D
Little-endian
ADR
FFFFF1C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB8RUN TB8CR TB8MOD TB8FFCR TB8ST TB8UCL TB8UCH TB8RG0L TB8RG0H TB8RG1L TB8RG1H TB8CP0L TB8CP0H TB8CP1L TB8CP1H
ADR
FFFFF1D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB9RUN TB9CR TB9MOD TB9FFCR TB9ST TB9UCL TB9UCH TB9RG0L TB9RG0H TB9RG1L TB9RG1H TB9CP0L TB9CP0H TB9CP1L TB9CP1H
ADR
FFFFF1E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TBARUN TBACR TBAMOD TBAFFCR TBAST TBAUCL TBAUCH TBARG0L TBARG0H TBARG1L TBARG1H TBACP0L TBACP0H TBACP1L TBACP1H
[4] I2C/SIO
ADR
FFFFF250H 1H 2H 3H
[5] UART/SIO
Register name
SBICR1 SBIDBR I2CAR SBICR2/SR
ADR
FFFFF260H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SC0BUF SC0CR SC0MOD0 BR0CR BR0ADD SC0MOD1 SC0MOD2 SC0EN SC0RFC SC0TFC SC0RST SC0TST SC0FCNF
ADR
FFFFF270H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SC1BUF SC1CR SC1MOD0 BR1CR BR1ADD SC1MOD1 SC1MOD2 SC1EN SC1RFC SC1TFC SC1RST SC1TST SC1FCNF
ADR
FFFFF280H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SC2BUF SC2CR SC2MOD0 BR2CR BR2ADD SC2MOD1 SC2MOD2 SC2EN SC2RFC SC2TFC SC2RST SC2TST SC2FCNF
4H SBIBR0 5H 6H 7H SBICR0 8H 9H AH BH CH DH EH FH
ADR
FFFFF290H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC3BUF SC3CR SC3MOD0 BR3CR BR3ADD SC3MOD1 SC3MOD2 SC3EN SC3RFC SC3TFC SC3RST SC3TST
ADR
FFFFF2A0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC4BUF SC4CR SC4MOD0 BR4CR BR4ADD SC4MOD1 SC4MOD2 SC4EN SC4RFC SC4TFC SC4RST SC4TST
ADR
FFFFF2B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC5BUF SC5CR SC5MOD0 BR5CR BR5ADD SC5MOD1 SC5MOD2 SC5EN SC5RFC SC5TFC SC5RST SC5TST
ADR
FFFFF2C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC6BUF SC6CR SC6MOD0 BR6CR BR6ADD SC6MOD1 SC6MOD2 SC6EN SC6RFC SC6TFC SC6RST SC6TST
CH SC3FCNF DH EH FH
CH SC4FCNF DH EH FH
CH SC5FCNF DH EH FH
CH SC6FCNF DH EH FH
TMP19A64(rev1.1)-21-4
TMP19A64C1D
Little-endian [7] KWUP
Register name
ADREG08L ADREG08H ADREG19L ADREG19H ADREG2AL ADREG2AH ADREG3BL ADREG3BH ADREG4CL ADREG4CH ADREG5DL ADREG5DH ADREG6EL ADREG6EH ADREG7FL ADREG7FH
[6] 10-bit ADC
ADR
FFFFF300H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
ADR
FFFFF310H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADREGSPL ADREGSPH ADCOMREGL ADCOMREGH ADMOD0 ADMOD1 ADMOD2 ADMOD3 ADMOD4
ADR
FFFFF360H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
KWUPST0 KWUPST1 KWUPST2 KWUPST3 KWUPST4 KWUPST5 KWUPST6 KWUPST7
ADR
Register name
ADCLK
FFFFF370H KWUPST 1H KUPPUP 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[8] 32-bit input capture
ADR Register name ADR Register name ADR Register name
FFFFF400H TCCR 1H TBTRUN 2H TBTCR 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH TBTCAP0 TBTCAP1 TBTCAP2 TBTCAP3 TBTRDCAP0 TBTRDCAP1 TBTRDCAP2 TBTRDCAP3 TCGIM TCGST
FFFFF410H CAP0CR 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH TCCAP0LL TCCAP0LH TCCAP0HL TCCAP0HH CAP1CR
FFFFF420H CAP2CR 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH TCCAP2LL TCCAP2LH TCCAP2HL TCCAP2HH CAP3CR
TCCAP1LL TCCAP1LH TCCAP1HL TCCAP1HH
TCCAP3LL TCCAP3LH TCCAP3HL TCCAP3HH
[9] 32-bit output compare
ADR
FFFFF440H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TCCMP0LL TCCMP0LH TCCMP0HL TCCMP0HH TCCMP1LL TCCMP1LH TCCMP1HL TCCMP1HH TCCMP2LL TCCMP2LH TCCMP2HL TCCMP2HH TCCMP3LL TCCMP3LH TCCMP3HL TCCMP3HH
ADR
FFFFF450H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TCCMP4LL TCCMP4LH TCCMP4HL TCCMP4HH TCCMP5LL TCCMP5LH TCCMP5HL TCCMP5HH TCCMP6LL TCCMP6LH TCCMP6HL TCCMP6HH TCCMP7LL TCCMP7LH TCCMP7HL TCCMP7HH
ADR
FFFFF460H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TCCMP8LL TCCMP8LH TCCMP8HL TCCMP8HH TCCMP9LL TCCMP9LH TCCMP9HL TCCMP9HH
ADR
FFFFF470H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CMPCTL0 CMPCTL1 CMPCTL2 CMPCTL3 CMPCTL4 CMPCTL5 CMPCTL6 CMPCTL7 CMPCTL8 CMPCTL9
TMP19A64(rev1.1)-21-5
TMP19A64C1D
Little-endian [10] INTC
ADR
FFFFE000H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMC0 ditto ditto ditto IMC1 ditto ditto ditto IMC2 ditto ditto ditto IMC3 ditto ditto ditto
ADR
FFFFE010H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMC4 ditto ditto ditto IMC5 ditto ditto ditto IMC6 ditto ditto ditto IMC7 ditto ditto ditto
ADR
FFFFE020H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMC8 ditto ditto ditto IMC9 ditto ditto ditto IMCA ditto ditto ditto IMCB ditto ditto ditto
ADR
FFFFE030H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMCC ditto ditto ditto IMCD ditto ditto ditto IMCE ditto ditto ditto IMCF ditto ditto ditto
ADR
FFFFE040H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IVR ditto ditto ditto
ADR
FFFFE060H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
INTCLR ditto ditto ditto
ADR
FFFFE100H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ILEV ditto ditto ditto
TMP19A64(rev1.1)-21-6
TMP19A64C1D
Little-endian [11] DMAC
ADR
FFFFE200H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR0 ditto ditto ditto CSR0 ditto ditto ditto SAR0 ditto ditto ditto DAR0 ditto ditto ditto
ADR
FFFFE210H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR0 ditto ditto ditto
ADR
FFFFE220H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR1 ditto ditto ditto CSR1 ditto ditto ditto SAR1 ditto ditto ditto DAR1 ditto ditto ditto
ADR
FFFFE230H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR1 ditto ditto ditto
DTCR0 ditto ditto ditto
DTCR1 ditto ditto ditto
ADR
FFFFE240H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR2 ditto ditto ditto CSR2 ditto ditto ditto SAR2 ditto ditto ditto DAR2 ditto ditto ditto
ADR
FFFFE250H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR2 ditto ditto ditto
ADR
FFFFE260H 1H 2H 3H 4H 5H 6H 7H
Register name
CCR3 ditto ditto ditto CSR3 ditto ditto ditto SAR3 ditto ditto ditto DAR3 ditto ditto ditto
ADR
FFFFE270H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR3 ditto ditto ditto
DTCR2 ditto ditto ditto
8H 9H AH BH CH DH EH FH
DTCR3 ditto ditto ditto
ADR
FFFFE280H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR4 ditto ditto ditto CSR4 ditto ditto ditto SAR4 ditto ditto ditto DAR4 ditto ditto ditto
ADR
FFFFE290H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR4 ditto ditto ditto
ADR
FFFFE2A0H 1H 2H 3H 4H 5H 6H 7H
Register name
CCR5 ditto ditto ditto CSR5 ditto ditto ditto SAR5 ditto ditto ditto DAR5 ditto ditto ditto
ADR
FFFFE2B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR5 ditto ditto ditto
DTCR4 ditto ditto ditto
8H 9H AH BH CH DH EH FH
DTCR5 ditto ditto ditto
TMP19A64(rev1.1)-21-7
TMP19A64C1D
Little-endian
ADR
FFFFE2C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR6 ditto ditto ditto CSR6 ditto ditto ditto SAR6 ditto ditto ditto DAR6 ditto ditto ditto
ADR
FFFFE2D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR6 ditto ditto ditto
ADR
FFFFE2E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR7 ditto ditto ditto CSR7 ditto ditto ditto SAR7 ditto ditto ditto DAR7 ditto ditto ditto
ADR
FFFFE2F0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR7 ditto ditto ditto
DTCR6 ditto ditto ditto
DTCR7 ditto ditto ditto
ADR
FFFFE300H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
DCR ditto ditto ditto RSR ditto ditto ditto
DHR ditto ditto ditto
TMP19A64(rev1.1)-21-8
TMP19A64C1D
Little-endian [12] CS/WAIT controller
ADR
FFFFE400H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BMA0 ditto ditto ditto BMA1 ditto ditto ditto BMA2 ditto ditto ditto BMA3 ditto ditto ditto
ADR
FFFFE410H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BMA4 ditto ditto ditto BMA5 ditto ditto ditto
ADR
FFFFE480H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
B01CS ditto ditto ditto B23CS ditto ditto ditto B45CS ditto ditto ditto BEXCS ditto ditto ditto
[13] Access control
ADR Register name
[14] Security control
ADR
FFFFE510H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[15] FLASH control
ADR
FFFFE520H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
DSUSEC1 ditto ditto ditto DSUSEC2 ditto ditto ditto ROMSEC1
Register name
FLCS ditto ditto ditto
FFFFE500H PFBWAIT 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
ROMSEC2
[16] ROM correction
ADR
FFFFE540H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADDREG0 ditto ditto ditto ADDREG1 ditto ditto ditto ADDREG2 ditto ditto ditto ADDREG3 ditto ditto ditto
ADR
FFFFE550H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADDREG4 ditto ditto ditto ADDREG5 ditto ditto ditto ADDREG6 ditto ditto ditto ADDREG7 ditto ditto ditto
ADR
FFFFE560H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADDREG8 ditto ditto ditto ADDREG9 ditto ditto ditto ADDREGA ditto ditto ditto ADDREGB ditto ditto ditto
TMP19A64(rev1.1)-21-9
TMP19A64C1D
Little-endian [17] Clock timer
ADR
FFFFE700H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
RTCFLG ditto ditto ditto RTCCR ditto ditto ditto RTCREG ditto ditto ditto
ADR
FFFFE710H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
[18] CG
ADR
FFFFEE00H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SYSCR0 SYSCR1 SYSCR2 SYSCR3
ADR
FFFFEE10H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMCGA ditto ditto ditto IMCGB ditto ditto ditto IMCGC ditto ditto ditto IMCGD ditto ditto ditto
ADR
FFFFEE20H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
EICRCG ditto ditto ditto NMIFLG ditto ditto ditto
TMP19A64(rev1.1)-21-10
TMP19A64C1D
Big-endian [1] PORT registers
ADR
FFFFF000H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
P0 P1 P0CR P1CR P1FC
ADR
FFFFF010H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADR
FFFFF020H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
P4CR P4FC
P2 P2CR P2FC
P3 P3CR P3FC
P5 P6
P4
P5CR P5FC P6CR P6FC
ADR
FFFFF040H 1H 2H 3H
Register name
P7 P8 P9 PA
ADR
FFFFF050H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
PB PC PD PE PBCR PCCR PDCR PECR PBFC PCFC PDFC PEFC
ADR
FFFFF060H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
PF PG PH PI PFCR PGCR PHCR PICR PFFC PGFC PHFC PIFC
ADR
Register name
FFFFF070H PJ 1H PK 2H 3H 4H PJCR 5H PKCR 6H 7H 8H PJFC 9H PKFC AH BH CH DH EH FH
4H 5H 6H 7H PACR 8H 9H AH BH CH DH EH FH P7FC P8FC P9FC PAFC
CH DH PCODE EH PDODE FH PEODE
CH PFODE DH EH FH
ADR
FFFFF0C0H 1H 2H 3H 4H 5H 6H 7H
Register name
PL PM PN PO PLCR PMCR PNCR POCR
ADR
Register name
FFFFF0D0H PP 1H PQ 2H 3H 4H PPCR 5H PQCR 6H 7H 8H PPFC 9H AH BH CH PPFC2 DH PQFC2 EH FH
8H 9H AH BH POFC CH DH EH FH POODE
TMP19A64(rev1.1)-21-11
TMP19A64C1D
Big-endian [2] WDT
ADR Register name
FFFFF090H WDMOD 1H WDCR 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[3] 16-bit timer
ADR
FFFFF140H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB0RUN TB0CR TB0MOD TB0FFCR TB0ST TB0UCL TB0UCH TB0RG0L TB0RG0H TB0RG1L TB0RG1H TB0CP0L TB0CP0H TB0CP1L TB0CP1H
ADR
FFFFF150H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB1RUN TB1CR TB1MOD TB1FFCR TB1ST TB1UCL TB1UCH TB1RG0L TB1RG0H TB1RG1L TB1RG1H TB1CP0L TB1CP0H TB1CP1L TB1CP1H
ADR
FFFFF160H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB2RUN TB2CR TB2MOD TB2FFCR TB2ST TB2UCL TB2UCH TB2RG0L TB2RG0H TB2RG1L TB2RG1H TB2CP0L TB2CP0H TB2CP1L TB2CP1H
ADR
FFFFF170H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB3RUN TB3CR TB3MOD TB3FFCR TB3ST TB3UCL TB3UCH TB3RG0L TB3RG0H TB3RG1L TB3RG1H TB3CP0L TB3CP0H TB3CP1L TB3CP1H
ADR
FFFFF180H 1H 2H 3H
Register name
TB4RUN TB4CR TB4MOD TB4FFCR
ADR
FFFFF190H 1H 2H 3H
Register name
TB5RUN TB5CR TB5MOD TB5FFCR
ADR
FFFFF1A0H 1H 2H 3H
Register name
TB6RUN TB6CR TB6MOD TB6FFCR
ADR
FFFFF1B0H 1H 2H 3H
Register name
TB7RUN TB7CR TB7MOD TB7FFCR
4H TB4ST 5H 6H TB4UCL 7H TB4UCH 8H 9H AH BH CH DH EH FH TB4RG0L TB4RG0H TB4RG1L TB4RG1H TB4CP0L TB4CP0H TB4CP1L TB4CP1H
4H TB5ST 5H 6H TB5UCL 7H TB5UCH 8H 9H AH BH CH DH EH FH TB5RG0L TB5RG0H TB5RG1L TB5RG1H TB5CP0L TB5CP0H TB5CP1L TB5CP1H
4H TB6ST 5H 6H TB6UCL 7H TB6UCH 8H 9H AH BH CH DH EH FH TB6RG0L TB6RG0H TB6RG1L TB6RG1H TB6CP0L TB6CP0H TB6CP1L TB6CP1H
4H TB7ST 5H 6H TB7UCL 7H TB7UCH 8H 9H AH BH CH DH EH FH TB7RG0L TB7RG0H TB7RG1L TB7RG1H TB7CP0L TB7CP0H TB7CP1L TB7CP1H
TMP19A64(rev1.1)-21-12
TMP19A64C1D
Big-endian
ADR
FFFFF1C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB8RUN TB8CR TB8MOD TB8FFCR TB8ST TB8UCL TB8UCH TB8RG0L TB8RG0H TB8RG1L TB8RG1H TB8CP0L TB8CP0H TB8CP1L TB8CP1H
ADR
FFFFF1D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TB9RUN TB9CR TB9MOD TB9FFCR TB9ST TB9UCL TB9UCH TB9RG0L TB9RG0H TB9RG1L TB9RG1H TB9CP0L TB9CP0H TB9CP1L TB9CP1H
ADR
FFFFF1E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TBARUN TBACR TBAMOD TBAFFCR TBAST TBAUCL TBAUCH TBARG0L TBARG0H TBARG1L TBARG1H TBACP0L TBACP0H TBACP1L TBACP1H
[4] I2C/SIO
ADR
FFFFF250H 1H 2H 3H
[5] UART/SIO
Register name
SBICR1 SBIDBR I2CAR SBICR2/SR
ADR
FFFFF260H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SC0BUF SC0CR SC0MOD0 BR0CR BR0ADD SC0MOD1 SC0MOD2 SC0EN SC0RFC SC0TFC SC0RST SC0TST SC0FCNF
ADR
FFFFF270H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SC1BUF SC1CR SC1MOD0 BR1CR BR1ADD SC1MOD1 SC1MOD2 SC1EN SC1RFC SC1TFC SC1RST SC1TST SC1FCNF
ADR
FFFFF280H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SC2BUF SC2CR SC2MOD0 BR2CR BR2ADD SC2MOD1 SC2MOD2 SC2EN SC2RFC SC2TFC SC2RST SC2TST SC2FCNF
4H SBIBR0 5H 6H 7H SBICR0 8H 9H AH BH CH DH EH FH
ADR
FFFFF290H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC3BUF SC3CR SC3MOD0 BR3CR BR3ADD SC3MOD1 SC3MOD2 SC3EN SC3RFC SC3TFC SC3RST SC3TST
ADR
FFFFF2A0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC4BUF SC4CR SC4MOD0 BR4CR BR4ADD SC4MOD1 SC4MOD2 SC4EN SC4RFC SC4TFC SC4RST SC4TST
ADR
FFFFF2B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC5BUF SC5CR SC5MOD0 BR5CR BR5ADD SC5MOD1 SC5MOD2 SC5EN SC5RFC SC5TFC SC5RST SC5TST
ADR
FFFFF2C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Register name
SC6BUF SC6CR SC6MOD0 BR6CR BR6ADD SC6MOD1 SC6MOD2 SC6EN SC6RFC SC6TFC SC6RST SC6TST
CH SC3FCNF DH EH FH
CH SC4FCNF DH EH FH
CH SC5FCNF DH EH FH
CH SC6FCNF DH EH FH
TMP19A64(rev1.1)-21-13
TMP19A64C1D
Big-endian [7] KWUP
Register name
ADREG08L ADREG08H ADREG19L ADREG19H ADREG2AL ADREG2AH ADREG3BL ADREG3BH ADREG4CL ADREG4CH ADREG5DL ADREG5DH ADREG6EL ADREG6EH ADREG7FL ADREG7FH
[6] 10-bit ADC
ADR
FFFFF300H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
ADR
FFFFF310H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADREGSPL ADREGSPH ADCOMREGL ADCOMREGH ADMOD0 ADMOD1 ADMOD2 ADMOD3 ADMOD4
ADR
FFFFF360H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
KWUPST0 KWUPST1 KWUPST2 KWUPST3 KWUPST4 KWUPST5 KWUPST6 KWUPST7
ADR
Register name
ADCLK
FFFFF370H KWUPST 1H KUPPUP 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[8] 32-bit input capture
ADR Register name ADR Register name ADR Register name
FFFFF400H TCCR 1H TBTRUN 2H TBTCR 3H 4H 5H 6H 7H 8H 9H AH BH TBTCAP0 TBTCAP1 TBTCAP2 TBTCAP3 TBTRDCAP0 TBTRDCAP1 TBTRDCAP2 TBTRDCAP3
FFFFF410H CAP0CR 1H 2H 3H 4H 5H 6H 7H TCCAP0LL TCCAP0LH TCCAP0HL TCCAP0HH
FFFFF420H CAP2CR 1H 2H 3H 4H 5H 6H 7H TCCAP2LL TCCAP2LH TCCAP2HL TCCAP2HH
8H CAP1CR 9H AH BH CH DH EH FH TCCAP1LL TCCAP1LH TCCAP1HL TCCAP1HH
8H CAP3CR 9H AH BH CH DH EH FH TCCAP3LL TCCAP3LH TCCAP3HL TCCAP3HH
CH TCGIM DH TCGST EH FH
[9] 32-bit output compare
ADR
FFFFF440H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TCCMP0LL TCCMP0LH TCCMP0HL TCCMP0HH TCCMP1LL TCCMP1LH TCCMP1HL TCCMP1HH TCCMP2LL TCCMP2LH TCCMP2HL TCCMP2HH TCCMP3LL TCCMP3LH TCCMP3HL TCCMP3HH
ADR
FFFFF450H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TCCMP4LL TCCMP4LH TCCMP4HL TCCMP4HH TCCMP5LL TCCMP5LH TCCMP5HL TCCMP5HH TCCMP6LL TCCMP6LH TCCMP6HL TCCMP6HH TCCMP7LL TCCMP7LH TCCMP7HL TCCMP7HH
ADR
FFFFF460H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
TCCMP8LL TCCMP8LH TCCMP8HL TCCMP8HH TCCMP9LL TCCMP9LH TCCMP9HL TCCMP9HH
ADR
FFFFF470H 1H 2H 3H 4H 5H 6H 7H
Register name
CMPCTL0 CMPCTL1 CMPCTL2 CMPCTL3 CMPCTL4 CMPCTL5 CMPCTL6 CMPCTL7
8H CMPCTL8 9H CMPCTL9 AH BH CH DH EH FH
TMP19A64(rev1.1)-21-14
TMP19A64C1D
Big-endian [10] INTC
ADR
FFFFE000H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMC0 ditto ditto ditto IMC1 ditto ditto ditto IMC2 ditto ditto ditto IMC3 ditto ditto ditto
ADR
FFFFE010H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMC4 ditto ditto ditto IMC5 ditto ditto ditto IMC6 ditto ditto ditto IMC7 ditto ditto ditto
ADR
FFFFE020H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMC8 ditto ditto ditto IMC9 ditto ditto ditto IMCA ditto ditto ditto IMCB ditto ditto ditto
ADR
FFFFE030H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMCC ditto ditto ditto IMCD ditto ditto ditto IMCE ditto ditto ditto IMCF ditto ditto ditto
ADR
FFFFE040H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IVR ditto ditto ditto
ADR
FFFFE060H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
INTCLR ditto ditto ditto
ADR
FFFFE100H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ILEV ditto ditto ditto
TMP19A64(rev1.1)-21-15
TMP19A64C1D
Big-endian [11] DMAC
ADR
FFFFE200H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR0 ditto ditto ditto CSR0 ditto ditto ditto SAR0 ditto ditto ditto DAR0 ditto ditto ditto
ADR
FFFFE210H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR0 ditto ditto ditto
ADR
FFFFE220H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR1 ditto ditto ditto CSR1 ditto ditto ditto SAR1 ditto ditto ditto DAR1 ditto ditto ditto
ADR
FFFFE230H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR1 ditto ditto ditto
DTCR0 ditto ditto ditto
DTCR1 ditto ditto ditto
ADR
FFFFE240H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR2 ditto ditto ditto CSR2 ditto ditto ditto SAR2 ditto ditto ditto DAR2 ditto ditto ditto
ADR
FFFFE250H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR2 ditto ditto ditto
ADR
FFFFE260H 1H 2H 3H 4H 5H 6H 7H
Register name
CCR3 ditto ditto ditto CSR3 ditto ditto ditto SAR3 ditto ditto ditto DAR3 ditto ditto ditto
ADR
FFFFE270H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR3 ditto ditto ditto
DTCR2 ditto ditto ditto
8H 9H AH BH CH DH EH FH
DTCR3 ditto ditto ditto
ADR
FFFFE280H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR4 ditto ditto ditto CSR4 ditto ditto ditto SAR4 ditto ditto ditto DAR4 ditto ditto ditto
ADR
FFFFE290H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR4 ditto ditto ditto
ADR
FFFFE2A0H 1H 2H 3H 4H 5H 6H 7H
Register name
CCR5 ditto ditto ditto CSR5 ditto ditto ditto SAR5 ditto ditto ditto DAR5 ditto ditto ditto
ADR
FFFFE2B0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR5 ditto ditto ditto
DTCR4 ditto ditto ditto
8H 9H AH BH CH DH EH FH
DTCR5 ditto ditto ditto
TMP19A64(rev1.1)-21-16
TMP19A64C1D
Big-endian
ADR
FFFFE2C0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR6 ditto ditto ditto CSR6 ditto ditto ditto SAR6 ditto ditto ditto DAR6 ditto ditto ditto
ADR
FFFFE2D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR6 ditto ditto ditto
ADR
FFFFE2E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
CCR7 ditto ditto ditto CSR7 ditto ditto ditto SAR7 ditto ditto ditto DAR7 ditto ditto ditto
ADR
FFFFE2F0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BCR7 ditto ditto ditto
DTCR6 ditto ditto ditto
DTCR7 ditto ditto ditto
ADR
FFFFE300H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
DCR ditto ditto ditto RSR ditto ditto ditto
DHR ditto ditto ditto
TMP19A64(rev1.1)-21-17
TMP19A64C1D
Big-endian [12] CS/WAIT controller
ADR
FFFFE400H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BMA0 ditto ditto ditto BMA1 ditto ditto ditto BMA2 ditto ditto ditto BMA3 ditto ditto ditto
ADR
FFFFE410H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
BMA4 ditto ditto ditto BMA5 ditto ditto ditto
ADR
FFFFE480H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
B01CS ditto ditto ditto B23CS ditto ditto ditto B45CS ditto ditto ditto BEXCS ditto ditto ditto
[13]Access control
ADR Register name
[14] Security control
ADR
FFFFE510H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[15] FLASH control
ADR
FFFFE520H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
DSUSEC1 ditto ditto ditto DSUSEC2 ditto ditto ditto ROMSEC1
Register name
FLCS ditto ditto ditto
FFFFE500H 1H 2H 3H PFBWAIT 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
ROMSEC2
[16] ROM correction
ADR
FFFFE540H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADDREG0 ditto ditto ditto ADDREG1 ditto ditto ditto ADDREG2 ditto ditto ditto ADDREG3 ditto ditto ditto
ADR
FFFFE550H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADDREG4 ditto ditto ditto ADDREG5 ditto ditto ditto ADDREG6 ditto ditto ditto ADDREG7 ditto ditto ditto
ADR
FFFFE560H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
ADDREG8 ditto ditto ditto ADDREG9 ditto ditto ditto ADDREGA ditto ditto ditto ADDREGB ditto ditto ditto
TMP19A64(rev1.1)-21-18
TMP19A64C1D
Big-endian [17] Clock timer
ADR
FFFFE700H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
RTCFLG ditto ditto ditto RTCCR ditto ditto ditto RTCREG ditto ditto ditto
ADR
FFFFE710H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
[18] CG
ADR
FFFFEE00H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
SYSCR3 SYSCR2 SYSCR1 SYSCR0
ADR
FFFFEE10H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
IMCGA ditto ditto ditto IMCGB ditto ditto ditto IMCGC ditto ditto ditto IMCGD ditto ditto ditto
ADR
FFFFEE20H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Register name
EICRCG ditto ditto ditto NMIFLG ditto ditto ditto
TMP19A64(rev1.1)-21-19
TMP19A64C1DXBG
22.
Electrical Characteristics
The letter x in equations presented in this chapter represents the cycle period of the fsys clock selected through the programming of the SYSCR1.SYSCK bit. The fsys clock may be derived from either the high-speed or low-speed crystal oscillator. The programming of the clock gear function also affects the fsys frequency. All relevant values in this chapter are calculated with the high-speed (fc) system clock (SYSCR1.SYSCK = 0) and a clock gear factor of 1/fc (SYSCR1.GEAR[2:0] = 000).
22.1
Absolute Maximum Ratings
Parameter
Symbol Vcc2 (Core) Vcc3I/O AVCCA/D BVCC VIN IOL IOL IOH IOH PD TSOLDER TSTG TOPR NEW
Rating - 0.3 to 3.0 - 0.3 to 3.9 - 0.3 to 3.9 - 0.3 to 3.9 - 0.3 to VCC+0.3 5 50 -5 50 600 260 -40 to 125 -20 to 85 0 to 70 100
Unit
Supply voltage
V
Supply voltage Low-level Per pin output Total current High-level Per pin output Total current Power dissipation (Ta = 85C) Soldering temperature (10 s) Storage temperature Except during flash W/E During flash W/E
V
mA
mW cycle
Operating temperature
Write/erase cycles
VCC15DVCC15CVCC15FVCC15VCC3DVCC3nn0 to 4 AVCCAVCC3m m1 to 2
Note:
VSSDVSSAVSSCVSSFVSS
The Absolute Maximum Rating is a rating that must never be exceeded, even for an instant. Not a single Absolute Maximum Rating value can be exceeded. If any Absolute Maximum Rating value is exceeded, the product may be damaged or weakened, or damage or combustion may cause personal injury. Always be sure to design your application devices so the Absolute Maximum Rating is never exceeded.
19A64(rev1.1)22-1
TMP19A64C1DXBG
22.2
DC Electrical Characteristics (1/3)
Ta20 to 85
Parameter Symbol Conditions
fosc = 8 to 13.5MHz fs = 30kHz to 34kHz fsys = 30kHz to 54MHz PLLOFF="1" fsys = 16kHz to 54MHz fsys = 4 to 54MHz
Min
Typ (Note 1)
Max
Unit
Supply voltage CVCC15DVCC15 CVSSDVSS0V
DVCC15 BVCC DVCC3n (n0 to 4) VIL1
1.35 1.8 1.65
1.65
V
3.3 3.3 0.3AVCC31 0.3AVCC32 0.3DVCC3n 0.3BVCC
P7 to P9 (Used as a port)
2.7VAVCC32AVCC313.3V
1.65VDVCC3n3.3V n=0 to 4 Normal port Low-level input voltage
VIL2
1.8VBVCC3.3V
1.65VDVCC3n3.3Vn=0 to 4 1.8VBVCC3.3V Schmitt-Triggered port
-0.3
0.2DVCC3n 0.2BVCC
V
VIL3
1.35VDVCC151.65V
0.1DVCC15
X1 XT1
VIL4 VIL5
1.35VCVCC151.65V 1.8VBVCC3.3V
0.1CVCC 0.1CVCC
Note1:
BVCC Normal mode 2.3V to 3.3V,BACKUP mode 1.8V to 3.3V
19A64(rev1.1)22-2
TMP19A64C1DXBG
Ta20 to 85
Parameter
P7 to P9 (Used as a port)
Symbol
Conditions
Min.
Typ
(Note 1)
Max.
Unit
VIH1
2.7VAVCC32AVCC313.3V
0.7AVCC31 0.7AVCC32 0.7DVCC3n 0.7BVCC 0.8DVCC3n 0.8BVCC 0.9DVCC15 0.9CVCC 0.9BVCC
0.4 0.2DVCC3n 0.4
High-level input voltage
Normal port
VIH2
1.65VDVCC3n3.3V n=0 to 4 1.8VBVCC3.3V 1.65VDVCC3n3.3V n=0 to 4 1.8VBVCC3.3V 1.35VDVCC151.65V
Schmitt-Triggered port
VIH3
DVCC3n+0. 3 BVCC+0.3 DVCC15+0. 2 CVCC+0.2
V
X1
VIH4 VIH4 VOL
1.35VCVCC1.65V
XT2
1.8VBVCC3.3V IOL = 2mA DVCC3n2.7V DVCC3n 2.7V DVCC3n 2.7V DVCC3n 2.7V
Low-level output voltage
IOL = 500A IOH = -2mA
2.4 0.8DVCC3n
V
High-level output voltage
VOH
IOH = -500A
Note 1:
Ta = 25C, DVCC15=1.5V,DVCC3n =3.0V, BVCC=3.0V, AVCC3m=3.3V, unless otherwise noted
19A64(rev1.1)22-3
TMP19A64C1DXBG
22.3
DC Electrical Characteristics (2/3)
Ta20 to 85
Parameter Symbol Conditions
0.0 VIN DVCC15 0.0 VIN BVCC Input leakage current
Min.
Typ
(Note 1)
Max.
Unit
ILI
0.0 VIN DVCC3nn=0 to 4 0.0 VIN AVCC31 0.0 VIN AVCC32 0.2 VIN DVCC15-0.2
0.02
5
A
Output leakage current
ILO
0.2 VIN BVCC-0.2 0.2 VIN DVCC3n-0.2n=0 to 4 0.2 VIN AVCC31-0.2 0.2 VIN AVCC32-0.2
0.05
10
VSTOP (DVCC15) VSTOP1
Power-down voltage (STOP mode RAM backup)
1.35 1.8
VIL1 = 0.3AVCC31,32 VIH1 = 0.7AVCC31,32 VIL2 = 0.3DVCC3n, VIL3 = 0.1DVCC3n VIH2 = 0.7DVCC3n, VIH3 = 0.9DVCC3n n=0 to 4 DVCC15 = 1.5V 0.15V 1.65VDVCC3n3.3Vn=0 to 4 1.8VBVCC3.3V 1.35VDVCC151.65V DVCC3n = 1.65V to 3.3Vn=0 to 4 DVCC15 = 1.35V to 1.65V BVCC = 1.8V to 3.3V Fc = 1MHz
1.65 3.3
V
(BVCC) VSTOP2 (AVCC3) VSTOP3 (DVCC3)
2.7 1.65 20 50
3.6 3.3 150
k
Pull-up resister at Reset
RRST
Schmitt-Triggered port
VTH
0.3
0.6
V
Programmable pull-up/ pull-down resistor Pin capacitance (Except power supply pins)
PKH CIO
20
50
150
k
10
pF
Note 1:
Ta = 25C, DVCC15=1.5V,DVCC3n =3.0V, BVCC=3.0V, AVCC3m=3.3V, unless otherwise noted
19A64(rev1.1)22-4
TMP19A64C1DXBG
22.4
DC Electrical Characteristics (3/3)
DVCC15CVCC15FVCC151.35V to 1.65V, DVCC3nFVCC32.7V to 3.3V, AVCC3m2.7V to 3.3V, BVCC=1.8V to 3.3V
Ta20 to 85
Parameter
n0 to 4m1,2
Symbol Conditions Min. Typ.
(Note 1)
Max. 60 28 23 970 950
Unit
NORMAL(Note 2): Gear = 1/1 IDLE(Doze) IDLE(Halt) SLOW SLEEP
Fsys = 54 MHz (fosc = 13.5 MHz, PLLOFF="DVCC15") Fsys = 32.768kHz (fs 32.768kHz)
50 18 14 300 100
mA
A A
ICC
Fsys = 32.768kHz (fs 32.768kHz) DVCC15 = CVCC15 =1.35 to 1.65V BVCC 1.8 to 3.3V DVCC3n = 1.65 to 3.3V AVCC3m = 2.7 to 3.3V BVCC 1.8 to 3.3V
STOP
90
900
A
BACKUP
3
5
A
Note 1:
Ta = 25C, DVCC15=1.5V,DVCC3n =3.0V, BVCC=3.0V, AVCC3m=3.3V, unless otherwise noted
Note 2: Measured with the CPU dhrystone operating, all I/O peripherals channel on, and 16-bit external bus operated with 4 system clocks. Note 3: The supply current flowing through the DVCC15BVCCDVCC3nCVCC15 and AVCC3m pins is included in the digital supply current parameter (ICC).
19A64(rev1.1)22-5
TMP19A64C1DXBG
22.5
10-bit ADC Electrical Characteristics
DVCC15=CVCC15=1.35V to 1.65V, AVCC3m=2.7V to 3.3V, AVSS=DVSS, Ta20 to 85
Parameter
Analog reference voltage (+) Analog reference voltage (-) Analog input voltage A/D conversion Analog supply current Non-A/D conversion Analog input capacitance Analog input impedance INL error
Symbol VREFH VREFL VAIN
Conditions
Min 2.7 AVCC3m-0.3 AVSS VREFL
Typ AVCC AVSS
Max 3.3 AVCC3m+0.3 AVSS+0.2 VREFH 1.8
Unit
V V V mA
IREF
AVCC3m = VREFH = 3.0V 0.3V DVSS = AVSS = VREFL AVCC3m = VREFH = 2.7 to 3.3V DVSS = AVSS = VREFL
1.15
0.1 1.0 2.0
10.0 2.0 3.5 3 3 3 4
A pF k LSB

AVCC3m = VREFH = 3.0 V 0.3 V DVSS = AVSS = VREFL AIN resistance < 1.3k AIN load capacitance < 20 pF AVCCm load capacitance 10 F VREFH load capacitance 10 F
2 1 2 2
DNL error
LSB
Offset error
LSB
Gain error
Conversion time 7.85 s
LSB
Note 1: 1LSB = (VREFH - VREFL)/1024[V] Note 2: The supply current flowing through the AVCC3m pin is included in the digital supply current parameter (ICC).
19A64(rev1.1)22-6
TMP19A64C1DXBG
22.6
AC Electrical Characteristics
1Separate Bus mode (1)DVCC15CVCC15FVCC151.35V to 1.65V, DVCC3nFVCC32.3V to 3.3V SYSCR3 = "0", 2 programmed wait state Equation No.
1
54 MHz (fsys) Max Min 17 4.5 Max
Parameter
System clock period (x) A0-A23 valid to RD , WR or HWR asserted A0-A23 hold after RD , WR or HWR negated
Symbol
Unit
Min
tSYS tAC tCAR tAD tRD tRR tHR tRAE tWW
18.5 (1+ALE)x-20 x-14 x(2+TW+ALE)-42 x(1+TW)-28 x(1+TW)-10 0 x-15 x(1+TW)-10 12.3 x(1+TW)-18 x-15 x+(ALE)x+(TW-1 )x -30 x(TW-1)-17 37.5 3.5 25.5 25.5 38.5 45.5 0 3.5 45.5 12.3
ns ns ns
2
3 4 5 6 7
A0-A23 valid to D0-D15 Data in
50.5 27.5
ns ns ns ns ns ns ns ns ns
RD asserted to D0-D15 data in RD
width low
D0-D15 hold after RD negated
RD negated to next A0-A23 output
8
9 10 11 12
WR /HWR
valid
width low
WR or HWR
asserted to D0-D15 t DO
WR
D0-D15 hold after HWR negated
or
tDW tWD tAW tCW
D0-D15 hold after WR or HWR negated
13 14
A0-A23 valid to
WAIT HWR asserted
WAIT
input
or
ns ns
hold after RD , WR
x(TW-3)+7
Note 1: No. 1 to 13
Internal 2 wait insertion ALE "1" Clock@54MHz TW = (Auto wait insertion + 2N) No. 14 Conditions (Auto wait insertion + 2N)
TW = 2 + 2*1 = 4 AC measurement conditions: Output levels: Input levels: High = 0.8DVCC33 V/Low 0.2DVCC33 V, CL = 30 pF High = 0.7DVCC33 V/Low 0.3DVCC33 V
19A64(rev1.1)22-7
TMP19A64C1DXBG
(2) DVCC15CVCC15FVCC151.35V to 1.65V, DVCC3nFVCC31.65V to 1.95V
SYSCR3 = "0", 2programmed wait state No.
1
Parameter
System clock period (x)
Symbol
Equation Min Max 18.5 (1+ALE)x-20 x-7 x(2+TW+ALE)-42 x(1+TW)-28 x(1+TW)-10 0 x-15 x(1+TW)-10 12.3 x(1+TW)-18 x-15 x+(ALE)x+(TW-1 )x -30 x(TW-1)-17
54 MHz (fsys) Unit Min 17 11.5 50.5 27.5 45.5 0 3.5 45.5 12.3 37.5 3.5 25.5 25.5 38.5 Max
ns ns ns ns ns ns ns ns ns ns ns ns
tSYS tAC tCAR tAD tRD tRR tHR tRAE tWW tDO tDW tWD tAW tCW
2 A0-A23 valid to RD , WR or HWR asserted 3 A0-A23 hold after RD , WR or HWR negated 4 5 6 7 A0-A23 valid to D0-D15 Data in
RD asserted to D0-D15 data in RD
width low
D0-D15 hold after RD negated
8 RD negated to next A0-A23 output 9
WR /HWR
width low
10 WR or HWR asserted to D0-D15 valid 11 12
D0-D15 hold after negated
D0-D15 hold negated after
WR
or
or
HWR
WR
HWR
13 14
A0-A23 valid to
WAIT
input
ns ns
WAIT hold after RD , WR or HWR asserted
x(TW-3)+7
Note 1: No. 1 to 13
Internal 2 wait insertion ALE "1" Clock@54MHz TW = (Auto wait + 2N) No. 14 Conditions (Auto wait insertion + 2N)
TW = 2 + 2*1 = 4
AC measurement conditions: Output levels: Input levels: High = 0.8DVCC33 V/Low 0.2DVCC33 V, CL = 30 pF High = 0.7DVCC33 V/Low 0.3DVCC33 V
19A64(rev1.1)22-8
TMP19A64C1DXBG
(1)
Read cycle timing (SYSCR3 = 0, 1 programmed wait state)
4CLK/1BUS Cycle
Internal CLK
S1
Sw
S2
S0
S1
CS0~3 tAD tAC tHR
A0~23
D0~15
D015
tRR tRD
tCAR tRAE
RD
R/W
19A64(rev1.1)22-9
TMP19A64C1DXBG
(2) Read cycle timing (SYSCR3 = 1, 1 programmed wait state)
5CLK/1BUS Cycle
InternalCLK S1i S1 Sw S2 S0 S1i
CS0~3 tAD tAC
A16~23
tAD D0~15
tHR D015
tRR tRD
tCAR tRAE
RD
R/W
19A64(rev1.1)22-10
TMP19A64C1DXBG
(2)Read cycle timing SYSCR3 = 1, 4 externally generated wait states with N = 1)
8CLK/1BUS Cycle
Internal CLK
S1
Sw
Sw
SwE
Sw
S2
S0
S1i
CS0~3
A0~23
D0~15
D015
RD
tCW
R/W
tAW WAIT
19A64(rev1.1)22-11
TMP19A64C1DXBG
(4) Write cycle timing (SYSCR3 = 1, zero wait sate)
4CLK/1BUS Cycle
Internal CLK
CS0~3
A0~23
tAC
tDW D0~15 tDO tWW WR, HWR D015
tWD
tCAR
R/W
19A64(rev1.1)22-12
TMP19A64C1DXBG
2Multiplex Bus mode (1) DVCC15CVCC15FVCC151.35V to 1.65V, DVCC3nFVCC32.3V to 3.3V 1. No.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
ALE width = 1 clock cycle, 2 programmed wait state Parameter Symbo l Min
tSYS tAL tLA tLL tLC tCL tACL tACH tCAR tADL tADH tRD tRR tHR tRAE tWW tDW tWD tAWH tAWL tCW x(TW-3)+7 x(1+TW)-10 0 x-15 x(1+TW)-10 x(1+TW)-18 x-15 x+(ALE)x+(TW-1)x-3 0 x+(ALE)x+(TW-1)x-3 0 x(TW-1)-17 25.5 18.5 (ALE)x-12 x-8 (ALE)x-6 x-8 x-15 2x-20 2x-20 x-14 x(2+TW+ALE)-42 x(2+TW+ALE)-42 x(1+TW)-28 45.5 0 3.5 45.5 37.5 3.5 25.5 25.5 38.5 6.5 10.5 12.5 10.5 3.5 17.0 17.0 4.5 50.5 50.5 27.5
Equation Max
54 MHz (fsys) Min Max
Unit
System clock period (x)
ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns
A0-A15 valid to ALE low A0-A15 hold after ALE low
ALE pulse width high
ALE low to asserted
RD
,
WR
or
HWR
RD , WR or HWR negated to ALE high
A0-A15 valid to RD , WR or HWR asserted A16-A23 valid to RD , WR or HWR asserted A16-A23 hold after RD , WR or HWR negated
A0-A15 valid to D0-D15 Data in
A16-A23 valid to D0-D15 Data in RD asserted to D0-D15 data in
RD
width low
D0-D15 hold after RD negated
RD negated to next A0-A15 output
WR / HWR
width low
D0-D15 valid to WR or HWR negated D0-D15 hold after WR or HWR negated
A16-A23 valid to WAIT input A0-A15 valid to WAIT input
WAIT hold after RD , WR or HWR asserted
Note 1: No. 1 to 20
Internal 2 wait insertion ALE "1" Clock@54MHz TW = (Auto wait insertion + 2N) No. 21 Conditions (Auto wait + 2N)
TW = 2 + 2*1 = 4
AC measurement conditions: Output levels: High = 0.8DVCC33 V/Low 0.2DVCC33 V, CL = 30 pF
19A64(rev1.1)22-13
TMP19A64C1DXBG
Input levels: High = 0.7DVCC33 V/Low 0.3DVCC33 V
(2) DVCC15CVCC15FVCC151.35V to 1.65V, DVCC3nFVCC31.65V to 1.95V
ALE width = 1 clock cycles, 2 programmed wait state No.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Parameter
System clock period (x)
Symbo l
tSYS tAL tLA tLL tLC tCL tACL tACH tCAR tADL tADH tRD tRR tHR tRAE tWW tDW tWD tAWH tAWL tCW
Equation Min
18.5 (ALE)x-12 x-8 (ALE)x-6 x-8 x-15 2x-20 2x-20 x-7 x(2+TW+ALE)-42 x(2+TW+ALE)-42 x(1+TW)-28 x(1+TW)-10 0 x-15 x(1+TW)-10 x(1+TW)-18 x-15 x+(ALE)x+(TW-1)x-3 0 x+(ALE)x+(TW-1)x-3 0 x(TW-3)+7 x(TW-1)-17
54 MHz (fsys) Unit Max Min
6.5 10.5 12.5 10.5 3.5 17.0 17.0 11.5 50.5 50.5 27.5 45.5 0 3.5 45.5 37.5 3.5 25.5 25.5 25.5 38.5
Max
ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns
A0-A15 valid to ALE low A0-A15 hold after ALE low
ALE pulse width high
ALE low to asserted
high
RD
,
WR
or
HWR
RD , WR or HWR
negated to ALE
A0-A15 valid to RD , WR or HWR asserted A16-A23 valid to RD , WR or HWR asserted A16-A23 hold after RD , WR or HWR negated
A0-A15 valid to D0-D15 Data in
A16-A23 valid to D0-D15 Data in RD asserted to D0-D15 data in
RD
width low
D0-D15 hold after RD negated
RD negated to next A0-A15 output
WR / HWR
width low
D0-D15 valid to WR or HWR negated D0-D15 hold after WR or HWR negated
A16-A23 valid to WAIT input A0-A15 valid to WAIT input
WAIT hold after RD , WR or HWR asserted
Note 1: No. 1 to 20
Internal 2 wait insertion ALE "1" Clock@54MHz TW = (Auto insert wait + 2N) No. 21 Conditions (Auto 2 waits insertion + 2N)
TW = 2 + 2*1 = 4 AC measurement conditions: Output levels: Input levels: High = 0.8DVCC33 V/Low 0.2DVCC33 V, CL = 30 pF High = 0.7DVCC33 V/Low 0.3DVCC33 V
19A64(rev1.1)22-14
TMP19A64C1DXBG
(1) Read cycle timing, ALE width = 1 clock cycle, 1 programmed wait state
5CLK/1BUS Cycle
Internal CLK
S1i tLL
W1 S1
Sw S2
S2 S3
S1 S0
S1i
ALE
tAL
tCL
tLA AD0~15 A015 tADL tADH A16~23 tACH tACL tLC tRD tRR tCAR tRAE tHR D015
RD
CS0~3
R/W
19A64(rev1.1)22-15
TMP19A64C1DXBG
(2) Read cycle timing, ALE width = 1 clock cycle, 2 programmed wait state
6CLK/1BUS Cycle
Internal CLK tLL ALE tAL tCL
tLA AD0~15 A015 tADL tADH A16~23 tACH tACL tLC tRD tRR tCAR tRAE tHR D015
RD
CS0~3
R/W
19A64(rev1.1)22-16
TMP19A64C1DXBG
(3) Read cycle timing, ALE width = 1 clock cycle, 4 programmed wait state
8CLK/1BUS Cycle
Internal CLK
ALE
AD0~15
A015
D015
AD16~23
RD
tCW CS0~3
R/W tAWL/H WAIT
19A64(rev1.1)22-17
TMP19A64C1DXBG
(4) Read cycle timing, ALE width = 2 clock cycle, 1 programmed wait state
6CLK/1BUS Cycle
Internal CLK
S1i
S1x tLL
S1
Sw
S2
S0
S1i
ALE
tAL
tCL
tLA AD0~15 A015 tADL tADH A16~23 tACH tACL tLC tRD tRR tRAE tHR D015
RD
CS0~3
R/W
19A64(rev1.1)22-18
TMP19A64C1DXBG
(5) Read cycle timing, ALE width = 2 clock cycle, 4 programmed wait state
9CLK/1BUS Cycle
Internal CLK
S1x
S1
Sw
Sw
SwEx
Sw
S2
S0
S1x
ALE
AD0~15
A015
D015
AD16~23
RD
tCW CS0~3
R/W tAWL/H WAIT
19A64(rev1.1)22-19
TMP19A64C1DXBG
(6) Write cycle timing, ALE width = 2 clock cycles, zero wait state
5CLK/1BUS Cycle
Internal CLK tLL ALE tAL tCL
tLA AD0~15 A015 tDW tACH tACL tLC WR, HWR tWW tCAR D015 tWD
AD16~23
CS0~3
R/W
19A64(rev1.1)22-20
TMP19A64C1DXBG
(7) Write cycle timing, ALE width = 1 clock cycles, 2 wait state
6CLK/1BUS Cycle
Internal CLK tLL ALE tAL tCL
tLA AD0~15 A015 tDW tACH tACL tLC WR, HWR tWW tCAR D015 tWD
AD16~23
CS0~3
R/W
19A64(rev1.1)22-21
TMP19A64C1DXBG
(8) Write cycle timing, ALE width = 2 clock cycles, 4 wait state
9CLK/1BUS Cycle
Internal CLK tLL ALE tAL tCL
tLA AD0~15 D015 tDW tACH tACL tLC WR, HWR tCW CS0~3 tWW tCAR tWD
A015
AD16~23
R/W tAWL/H WAIT
19A64(rev1.1)22-22
TMP19A64C1DXBG
22.7
Transfer with DMA Request
The following shows an example of a transfer between the on-chip RAM and an external device in multiplex bus mode. * * * * 16-bit data bus width, non-recovery time Level data transfer mode Transfer size of 16 bits, device port size (DPS) of 16 bits Source/destination: on-chip RAM/external device
The following shows transfer operation timing of the on-chip RAM to an external bus during write operation (memory-to-memory transfer).
GCLKIN Internal Clock tDREQ_w DREQn tDREQ_r AD[15:0]
Add Data Add
tDREQ_w
tDREQ_r
Data Add Data
(N-1)transfer ALE HWR LWR CS R/W
N transfer
(N+1)transfe
GBSTART GACK
2Clk 2Clk
(1) Indicates the condition under which Nth transfer is performed successfully. (2) Indicates the condition under which (N + 1)th transfer is not performed.
19A64(rev1.1)22-23
TMP19A64C1DXBG
(1) DVCC15CVCC15FVCC15 1.35V to 1.65V, AVCC3mFVCC32.7V to 3.3V DVCC332.3V to 3.3V, DVCC30/31/32/341.65V to 3.3V, Ta 20 to 85C m1 to 2 Equation No.
2
54 MHz (fsys) (2)Max Min
37
Parameter
RD asserted to DREQn negated (external device to on-chip RAM transfer)
Symbol (1)Min
tDREQ_r W+1x
Unit
Max
152.5 ns
2WALE8x 51 5+WAITx51.8
3
WR / HWR rising to DREQn negated
tDREQ_w
-(W+2)x
-55.5
59.2
ns
(on-chip RAM to external device transfer)
(2) DVCC15CVCC15FVCC151.35V to 1.65V, AVCC3m =FVCC32.7V to 3.3V DVCC331.65V to 1.95V, DVCC30/31/32/341.65V to 3.3V, Ta20 to 85C m1 to 2 Equation No.
2
54 MHz (fsys) Min
37
Parameter
RD asserted to DREQn negated
Symbol (1)Min
tDREQ_r W+1x
Unit
(2)Max
2WALE8 x56 5+WAITx56.8
Max
147.5 ns
(external device to on-chip RAM transfer) 3
WR / HWR rising to DREQn negated
tDREQ_w
-(W+2)x
-55.5
54.2
ns
(on-chip RAM to external device transfer)
W:
Number of wait-state cycles inserted. In the case of (2 + N) externally generated wait states with N = 1, W becomes 4 ALE: Apply ALE = ALE 1 clock, ALE = 1 for ALE 2 clock. The values in the above table are obtained with W = 1, ALE = 1.
19A64(rev1.1)22-24
TMP19A64C1DXBG
22.8
(1)
Serial Channel Timing
I/O Interface mode (DVCC3n = 1.65V to 3.3V) In the table below, the letter x represents the fsys cycle period, which varies depending on the programming of the clock gear function. (1) SCLK input mode (SIO0 to SIO6) Parameter
Symbol tSCY TscH TscL tOSS tOHS tSRD tHSR
Equation Min
12x 6x 6x 2x-30 8x-15 30 2x+30
54 MHz Max Min
222 111 111 6 129 30 66
Max
Unit
ns ns ns ns ns ns ns
SCLK period SCLK Clock High width(input) SCLK Clock Low width (input) TxD data to SCLK rise or fall* TxD data hold after SCLK rise or fall* RxD data valid to SCLK rise or fall* RxD data hold after SCLK rise or fall*
* SCLK rise or fall: Measured relative to the programmed active edge of SCLK. 2. SCLK output mode (SIO0 to SIO6) Parameter
SCLK period TxD data to SCLK rise or fall* TxD data hold after SCLK rise or fall* RxD data valid to SCLK rise or fall* RxD data hold after SCLK rise or fall* Symbol tSCY tOSS tOHS tSRD tHSR
Equation Min
8x 4x-10 4x-10 45 0
54 MHz Max Min
222 62 62 45 0
Max
Unit
ns ns ns ns ns
tSCY
SCLK SCK Output Mode/ Active-High SCL Input Mod SCLK Active-Low SCK Input Mode
tOSS 0 tSRD 1
tOHS 2 tHSR 1 VALID 2 VALID 3 VALID 3
OUTPUT DATA TxD
INPUT DATA RxD
0 VALID
19A64(rev1.1)22-25
TMP19A64C1DXBG
22.9
SBI Timing
(1) I2C mode In the table below, the letters x represent the fsys periods, respectively. n denotes the value of n programmed into the SCK (SCL output frequency select) field in the SBI0CR1. Parameter
SCL clock frequency Hold time for START condition SCL clock low width (Input) (Note 1)
Symbol
tSC tHD:STA tLOW
Equation Min
0
Standard mode Min
0 4.0 4.7 4.0
Fast mode Min
0 0.6 1.3 0.6 0.6 0.0 100 0.6 1.3
Max
Max
100
Max
400
Unit
kHz s s s s s ns s s
SCL clock high width (Output) (Note 2) tHIGH Setup time for a repeated START condition Data hold time (Input) (Note 3, 4) Data setup time Setup time for STOP condition Bus free time between STOP and START conditions
tSU;STA tHD;DAT tSU;DAT tSU;STO tBUF
(Note 5)
4.7 0.0 250 4.0
(Note 5)
4.7
Note 1: Note 2:
SCL clock low width (output) is calculated with: (2n-1 +58)/(fsys/2) SCL clock high width (output) is calculated with (2n-1 +12)/(fsys/2)
Notice: On I2C-bus specification, Maximum Speed of Standard mode is 100KHz ,Fast mode is 400Khz. Internal SCL clock Frequency setting should be shown above Note1 & Note2. Note 3: The output data hold time is equal to 12x
Note 4: The Philips I2C-bus specification states that a device must internally provide a hold time of at least 300 ns for the SDA signal to bridge the undefined region of the fall edge of SCL. However, the 19A64 SBI does not satisfy this requirement. Also, the output buffer for SCL does not incorporate slope control of the falling edges; therefore, the equipment manufacturer should design so that the input data hold time shown in the table is satisfied, including tr/tf of the SCL and SDA lines.
Note 5:
Software-dependent
tSCL tf SCL tHD;STA SDA S S: START condition Sr: Repeated START condition P: STOP condition Sr P tSU;DAT tHD;DAT tSU;STA tSU;STO tBUF tLOW tr tHIGH
19A64(rev1.1)22-26
TMP19A64C1DXBG
(2) Clock-Synchronous 8-Bit SIO mode In the tables below, the letters x represent the fsys cycle periods, respectively. The letter n denotes the value of n programmed into the SCK (SCL output frequency select) field in the SBI0CR1. The electrical specifications below are for an SCK signal with a 50% duty cycle. SCK Input mode Parameter
SCK period SO data to SCK rise SO data hold after SCK rise SI data valid to SCK rise SI data hold after SCK rise
Symbol
tSCY tOSS tOHS tSRD tHSR
Equation Min
16x (tSCY/2) - (6x + 30) (tSCY/2) + 4x 0 4x + 10
54 MHz Max Min
296 7 222 0 84
Max
Unit
ns ns ns ns ns
SCK Output mode Parameter
SCK period (programmable) SO data to SCK rise SO data hold after SCK rise SI data valid to SCK rise SI data hold after SCK rise
Symbol
tSCY tOSS tOHS tSRD tHSR
Equation Min
16x (tSCY/2) - 20 (tSCY/2) - 20 2x + 30 0
54 MHz Max Min
296 128 128 67 0
Max
Unit
ns ns ns ns ns
tSCY SCLK tOSS OUTPUT DATA TxD 0 tSRD INPUT DATA TxD 0 VALID 1 VALID 1 tHSR 2 VALID 3 VALID tOHS 2 3
19A64(rev1.1)22-27
TMP19A64C1DXBG
22.10
Event Counter
In the table below, the letter x represents the fsys cycle period. Parameter
Clock low pulse width Clock high pulse width
Symbol
tVCKL tVCKH
Equation Min
2X + 100 2X + 100
54 MHz Min
137 137
Max
Max
Unit
ns ns
22.11
Timer Capture
In the table below, the letter x represents the fsys cycle period. Parameter
Low pulse width High pulse width
Symbol
tCPL tCPH
Equation Min
2X + 100 2X + 100
54 MHz Min
137 137
Max
Max
Unit
ns ns
22.12
General Interrupts
In the table below, the letter x represents the fsys cycle period. Parameter
Low pulse width for INT0-INTA High pulse width for INT0-INTA
Symbol
tINTAL tINTAH
Equation Min
X + 100 X + 100
54 MHz Min
118.5 118.5
Max
Max
Unit
ns ns
22.13
NMI and STOP /SLEEP Wake-up Interrupts
Symbol
tINTBL tINTBH
Parameter
Low pulse width for NMI and INT0-INT4 High pulse width for INT0-INT4
Equation Min
100 100
54 MHz Min
100 100
Max
Max
Unit
ns ns
22.14
SCOUT Pin Symbol
tSCH tSCL
Parameter
Clock high pulse width Clock low pulse width
Equation Min
0.5T - 5 0.5T - 5
54 MHz Min
4.25 4.25
Max
Max
Unit
ns ns
Note: In the above table, the letter T represents the cycle period of the SCOUT output clock.
tSCH SCOUT tSCL
19A64(rev1.1)22-28
TMP19A64C1DXBG
22.15
Bus Request and Bus Acknowledge Signals
BUSRQ
(Note1)
BUSAK
tBAA tABA AD0~AD15 (Note2)
A0~A23, RD , WR
(Note2)
CS0 ~ CS3 ,
R / W , HWR
ALE
Parameter
Bus float to BUSAK asserted Bus float after BUSAK negated
Symbol
tABA tBAA
Equation Min
0 0
54 MHz Min
0 0
Max
80 80
Max
80 80
Unit
ns ns
Note 1: If the current bus cycle has not terminated due to wait-state insertion, the TMP19A64F20BXBG does not respond to BUSRQ until the wait state ends. Note 2: This broken line indicates that output buffers are disabled, not that the signals are at indeterminate states. The pin holds the last logic value present at that pin before the bus is relinquished. This is dynamically accomplished through external load capacitances. The equipment manufacturer may maintain the bus at a predefined state by means of off-chip restores, but he or she should design, considering the time (determined by the CR constant) it takes for a signal to reach a desired state. The on-chip, integrated programmable pullup/pulldown resistors remain active, depending on internal signal states.
19A64(rev1.1)22-29
TMP19A64C1DXBG
22.16
KWUP Input Pull-up Register Active
Parameter
Low pulse width for KEY0-D High pulse width for KEY0-D
Symbol
tkyTBL tkyTBH
Equation Min
X+100 X+100
54 MHz Min
118 118
Max
Max
Unit
ns ns
22.17
Dual Pulse Input Equation Min
8Y Y20 Y20
Parameter
Dual input pulse period Dual input pulse setup Dual input pulse hold
Symbol
Tdcyc Tabs Tabh
54 MHz Min
296 57 57
Max
Max
Unit
ns ns ns
Y:
Sampling clock (fsys/2)
A Tabs B Tabh Tdcyc
19A64(rev1.1)22-30
TMP19A64C1DXBG
23. Notations, Precautions and Restrictions
23.1 Notations and Terms
(1) I/O register fields are often referred to as . for the interest of brevity. For example, TRUN.T0RUN means the T0RUN bit in the TRUN register. (2) fc, fsys, state fosc: fpll: fc: fsys: Clock supplied from the X1 and X2 pins Clock generated by the on-chip PLL Clock selected by the PLLOFF pin Clock selected by the SYSCR1.SYSCK bit
fgear: Clock selected by the SYSCR1.GEAR[1:0] bits The fsys cycle is referred to as a state. In addition, the clock selected by the SYSCR1.FPSEL bit and the prescaler clock source selected by the SYSCR0.PRCK[1:0] bits are referred to as fperiph and T0 respectively.
23.2 Precautions and Restrictions
(1) Processor Revision Identifier The Process Revision Identifier (PRId) register in the TX19A core of the TMP19A64C1D contains 0x0000_2CA1. (2) BW0-BW1 Pins The BW0 and BW1 pins must be connected to the DVCC2 pin to ensure that their signal levels do not fluctuate during chip operation. (3) Oscillator Warm-Up Counter If an external crystal is utilized, an interrupt signal programmed to bring the TMP1940CYAF out of STOP mode triggers the on-chip warm-up counter. The system clock is not supplied to the on-chip logic until the warm-up counter expires. (4) Programmable Pullup Resistors When port pins are configured as input ports, the integrated pull-up resistors can be enabled and disabled under software control. The pull-up resistors are not programmable when port pins are configured as output ports. The relevant port registers are programmed with the data resister. (5) External Bus Mastership The pin states while the bus is granted to an external device are described in Chapter 7, I/O Ports. (6) Watchdog Timer (WDT) Upon reset, the WDT is enabled. If the watchdog timer function is not required, it must be disabled after reset. When relevant pins are configured as bus arbitration signals, the I/O peripherals including the WDT can operate during external bus mastership. (7) A/D Converter (ADC) The ladder resistor network between the VREFH and VREFL pins can be disconnected under software control. This helps to reduce power dissipation, for example, in STOP mode.
TMP19A64(rev1.1)-23-1
TMP19A64C1DXBG
(8) Undefined Bits in I/O Registers Undefined I/O register bits are read as undefined states. Therefore, software must be coded without relying on the states of any undefined bits. (9) Electrostatic Discharge (ESD) Sensitivity The following shows ESD sensitivity. Protect the device from static damage during device development or production stage. For a detailed description on ESD, see General Safety Precautions and Usage Considerations. * TMP19A64C1DXBG Specification
Machine Model: MM Human Body Model: HBM
Sensitivity
200 V 1750V 2000 V
*
TMP19A64F20AXBG Specification
Machine Model: MM Human Body Model: HBM
Sensitivity
200 V 2000V 2000 V
(10) Bus Access of Debug Mode ( Mask product only) Bus Accessing is abnormal for external function with SREQ mode in Debug mode, Which means Debug="1" in CP0 register. Of Mask Type MCU ,TMP19A64C1DXBG. Pls don't access to external function with SREQ Mode in debug mode.
TMP19A64(rev1.1)-23-2
TMP19A64C1DXBG
(11) Notations, Precautions and Restrictions Overflow Exception Problem: If an overflow exception caused a jump to the exception handler and the first instruction in that exception handler caused another exception, the EPC register should point to the address of the first instruction in the exception handler. However, the EPC register might contain the address that caused the overflow exception. * Problem-Causing Situation: When, with the instruction pipeline full, an overflow exception was taken at the following sequence of instructions and then the first instruction in the overflow exception handler causes another exception ADD, ADDI or SUB Delay slot Note: Toshiba's compiler uses no instructions that could cause an overflow. Therefore, this problem does not occur. <= # Instruction that causes an overflow Jump or branch instruction <= # Instruction with a delay slot
Workaround: Don't place a jump or branch instruction immediately following an instruction that could cause an overflow (ADD, ADDI or SUB).
TMP19A64(rev1.1)-23-3
TMP19A64C1DXBG
LWL and LWR Instructions Problem: The LWL or LWR instruction might provide incorrect results. * Problem-Causing Situation #1: a. The destination of a load instruction (LB, LBU, LH, LHU, LW, LWL or LWR) is identical to that of the LWL or LWR instruction. b. The instruction pipeline is full. (The load instruction and the LWL or LWR instruction will be executed consecutively.) c. The DMAC is programmed for data cache snooping. Once the load instruction is executed, the DMAC initiates a DMA transaction. After it has been serviced, the LWL or LWR instruction is executed. This problem occurs when all of these conditions are true. * Problem-Causing Situation #2: a. The destination of a load instruction (LB, LBU, LH, LHU, LW, LWL or LWR) is identical to that of the LWL or LWR instruction. b. The Doze or Halt bit in the Config register is set to 1 immediately before the load instruction. c. The instruction pipeline is full. (The load instruction and the LWL or LWR instruction will be executed consecutively.) d. After the load instruction is executed, the processor is put in the STOP, SLEEP or IDLE mode. e. After an interrupt signaling brings the processor out of the STOP, SLEEP or IDLE mode, the LWL or LWR instruction is executed. Note: This applies to the case in which an interrupt signaling does not generate an interrupt upon exit from STOP or IDLE mode. In other words, either the IEc bit in the Status register is cleared (interrupts disabled), or if the IEc bit is set, the priority level of the incoming interrupt signaling is lower than the mask level programmed in the CMask field in the Status register. (Exit from STOP, SLEEP or IDLE mode can be accomplished even with such settings.)
This problem occurs when all of these conditions are true.
Workarounds: To use the LWL or LWR instruction, 1) Place a NOP between a load instruction and the LWL or LWR instruction, or 2) Disable the data cache snooping of the DMAC before the LWL or LWR instruction is executed. Also, do not put the processor in STOP, SLEEP or IDLE mode before the LWL or LWR instruction is executed.
TMP19A64(rev1.1)-23-4
TMP19A64C1DXBG
Overflow Exception When a DSU Probe Is Used Problem: It looks as if an overflow exception caused a jump to the reset and nonmaskable exception vector address (0xBFC0_0000). * Problem-Causing Situation: When an overflow exception occurs, with the processor connected to a DSU probe Note: Toshiba's compiler uses no instructions that could cause an overflow. Therefore, this problem does not occur.
Workaround: Don't place a jump or branch instruction immediately following an instruction that could cause an overflow (ADD, ADDI or SUB). Malfunction of using BUSREQ signl in External Bus Access mode
[Condition] In External Bus mode, using Auto WAIT insert function (as same as +N wait) Use External Bus request signal Function (BUSREQ). For each target product,Bus setting mode (Multiplex/ separate)ALE width(short/long) . Please refer to following table.
(Exp: ALE Band =1.5CLK, Auto wait = 3 )
Internal Clock
ALE Output (ALE=1.5CLK)
RD Output ( Normal )
S0
S1
W1
W2
W3
S2
S3
RD Output (abnormal )
S0
S1
W1
W2
S2
S3
Insert external Bus request (BUSREQ) When starting Bus cycle (S0)
tRD spec not achieve because of 1 minus wait from original
TMP19A64(rev1.1)-23-5


▲Up To Search▲   

 
Price & Availability of TMP19A64C1DXBG

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X